2008/8/25 Sam Varshavchik <[EMAIL PROTECTED]>:
> Juan Miscaro writes:
>
>> Hi, running courier pop and imap running on some boxes with postfix.
>> I want my maildroprc file to send spam to a spam folder:
>>
>> if (/^X-Spam-Status: Yes/)
>> {
>> to $MAILDIR/.Spam/
>
> That should be to "$MAILDIR/.Spam"
>
> You need to quote the pathname.
>
>> }
>>
>> But how does maildrop become aware of the MAILDIR variable? I'm using
>> authdaemon with mysql backend (authmysql) and it's working well.
>>
>> In authmysqlrc I have
>>
>> MYSQL_HOME_FIELD '/var/spool/virtual_mailboxes'
>> MYSQL_MAILDIR_FIELD virtual_mailbox
>>
>> A typical value for virtual_mailbox is
>>
>> example.com/username/Maildir/
>>
>> The postfix master.cf has
>>
>> maildrop unix - n n - - pipe
>> flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
>
> You're either have a custom version of maildrop built, your you have
> something /etc/maildroprc. maildrop, by default, does not import the MAILDIR
> environment variable. The list of environment variables imported by maildrop
> by default is listed in the maildropfilter man page.
Yes, I do have other stuff in maildroprc. But I'm trying to get away
from it (and use just what I quoted above) because I fear it is too
flaky:
---------------
logfile "/var/log/maildrop"
/^Delivered-To:\s*.+/
RECIPIENT=getaddr ${MATCH}
#`echo rcpt=$RECIPIENT >> /tmp/maildrop.out`
# split the recipient into user and domain parts
USER=""
DOMAIN=""
if ( ${RECIPIENT} =~ /(.*)@([EMAIL PROTECTED])/ )
{
USER=${MATCH1}
#`echo rcpt=$USER >> /tmp/maildrop.out`
DOMAIN=${MATCH2}
#`echo rcpt=$DOMAIN >> /tmp/maildrop.out`
}
else
{
#no domain part
USER=${RECIPIENT}
}
MAILDIR="/var/spool/virtual_mailboxes/$DOMAIN/$USER/Maildir"
#`echo rcpt=$MAILDIR >> /tmp/maildrop.out`
if (/^X-Spam-Status: Yes/)
{
to $MAILDIR/.Spam/
}
---------------
Thanks for any ideas,
/juan
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users