Juan Miscaro wrote:
>>
>
> Thanks. I will try that next. Meanwhile I found something.
>
> I added echo statements for $USER and $DOMAIN and saw that these
> variables remain empty. $RECIPIENT however remains good
> ('[EMAIL PROTECTED]'). This is maildroprc:
>
$DOMAIN is empty because of the error below. but $USER should have been
set...
>
> /^Delivered-To:\s*.+/
> RECIPIENT=getaddr ${MATCH}
>
> # split the recipient into user and domain parts
> USER=""
> DOMAIN=""
> if ( ${RECIPIENT} =~ /(.*)@([EMAIL PROTECTED])/ )
>
This should be
if ( ${RECIPIENT} =~ /(.*)@([EMAIL PROTECTED])/ )
('+' after ']').
> {
> USER=${MATCH1}
> DOMAIN=${MATCH2}
> }
> else
> {
> #no domain part
> USER=${RECIPIENT}
> }
>
> `echo rcpt=$RECIPIENT >> /tmp/maildrop.out`
> `echo user=$USER >> /tmp/maildrop.out`
> `echo domain=$DOMAIN >> /tmp/maildrop.out`
>
> # 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"
>
> `echo maildir=$MAILDIR >> /tmp/maildrop.out`
>
> #DEFAULT="/var/spool/virtual_mailboxes/example.com/$USER/Maildir/"
>
> if (/^X-Spam-Status: Yes/)
> {
> to $MAILDIR/.Polluriel/
> }
>
>
-------------------------------------------------------------------------
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