Juan Miscaro wrote:
> Thank you.
>
> I added the -D flag to master.cf.  Things seem to work but I am
> noticing some curious errors:
>
> postfix/pipe[11675]: DB84AC4501: to=<[EMAIL PROTECTED]>, relay=maildrop,
> delay=19551, delays=19551/0.01/0/0.04, dsn=4.3.0, status=deferred
> (temporary failure. Command output: /usr/local/bin/maildrop: Unable to
> open mailbox. )
>
> When opening the message DB84AC4501 I notice it has been tagged as
> spam.  This is the same (so far) for all tagged SPAM.  This tells me
> that the maildrop redirection (to the spam folder is not working).
>
> This is my complete maildroprc file:
>
> /^Delivered-To:\s*.+/
> RECIPIENT=getaddr ${MATCH}
>
> # split the recipient into user and domain parts
> USER=""
> DOMAIN=""
> if ( ${RECIPIENT} =~ /(.*)@([EMAIL PROTECTED])/ )
> {
>    USER=${MATCH1}
>    DOMAIN=${MATCH2}
> }
> else
> {
>   #no domain part
>   USER=${RECIPIENT}
> }
>
> # extract extension from user-part
> # we assume '+' is the delimiter. if you use another char, adjust..
> EXTENSION=""
> if ( ${USER} =~ /([^\+]+)\+(.*)/ )
> {
>   #extension found
>   USER=${MATCH1}
>   EXTENSION=${MATCH2}
> }
>
> MAILDIR="/var/spool/virtual_mailboxes/example.com/$USER/Maildir"
>
> if (/^X-Spam-Status: Yes/)
> {
>   to $MAILDIR/.Polluriel/
> }
>
>   
Does $MAILDIR/.Polluriel/ exist? If not, you should either create it 
ahead of time, or do

if (/^X-Spam-Status: Yes/)
{
  # try to deliver
  exception {
    to $MAILDIR/.Polluriel/
  }
  # an error occured. 
  # if it's because doesn't exist, create it
  `/path/to/maildirmake -f .Polluriel $MAILDIR; true`
  to $MAILDIR/.Polluriel/
}


adjust the maildirmake line. this is just an example to show the idea.


>
> And this is my master.cf maildrop line:
>
>
> maildrop  unix  -       n       n       -       -       pipe
>   flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} -w
> 75
>
>
>
> My maildrop log is showing usernames now:
>
> File: example.com/user/Maildir/ 
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to