From: Arvinn Løkkebakken [mailto:[EMAIL PROTECTED] > > Can MATCH varibles be set only once in maildrop? > > I try to pull out values from headers using $MATCH2, $MATCH3.. and > so on.. The problem is that it seems like $MATCH2 won't be set > again when doing a think like this: > > if ( /^From: *!.*/ ) > { > MAILFROM=getaddr($MATCH2) > } > > /^Received: from .* \(!.*! \[![0-9]\.[0-9]\.[0-9]\.[0-9]!\]\)\n\tby > frontendhost.example.com /:w > CLIENTHOST="$MATCH2" > CLIENTIP="$MATCH4" > > My problem here is that $CLIENTHOST is set to the same as $MAILFROM, > or is there something else that is wrong? > > I use maildrop 1.8.
Actually, I think the problem is with the pattern. You are only matching a single digit for each octet in the IP address. Try this one: /^Received: from .* \(!.*! \[![0-9]+\.[0-9]+\.[0-9]+\.[0-9]+!\]\)\n\tby frontendhost.example.com /:w If you still have problems with the match, you may want to be a bit less specific on the whitespace requirements. /^Received: from .*\(!.*!\[![0-9]+\.[0-9]+\.[0-9]+\.[0-9]+!\]\)[\n\t ]+by frontendhost.example.com /:w Bowie ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users