--- mouss <[EMAIL PROTECTED]> wrote:

> Juan Miscaro wrote:
> > --- mouss <[EMAIL PROTECTED]> wrote:
> >
> >   
> >> 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/
> >>> }
> >>>       
> >
> >
> > Made the correction.
> >
> > Nope.  No $USER and no $DOMAIN.  Strange.
> >
> > Is there some caching of a previous configuration?  Should I
> restart a
> > service?
> >   
> 
> 
> no. you need to debug the if else statements that set the USER and 
> DOMAIN variables. add echo's inside each case.


I did that and it shows that the first case is being used but still not
values for $USER and $DOMAIN.

I hardcoded the recipient and it still doesn't work:


if ( ${RECIPIENT} =~ /(user)@(example.com)/ )
{
USER=${MATCH1}
`echo user1=$USER >> /tmp/maildrop.out`
DOMAIN=${MATCH2}
`echo domain1=$DOMAIN >> /tmp/maildrop.out`
}


The echoes are parsed.  Just no values.

   Juan


      Get a sneak peak at messages with a handy reading pane with All new 
Yahoo! Mail: http://mrd.mail.yahoo.com/try_beta?.intl=ca

-------------------------------------------------------------------------
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