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.
I noticed that you don't have an IF block around that second regex.
Is it possible that the MATCH2 variable is not set because the regex
didn't match?
Try this:
if ( /^Received: from .* \(!.*!
\[![0-9]\.[0-9]\.[0-9]\.[0-9]!\]\)\n\tby frontendhost.example.com /:w )
{
CLIENTHOST="$MATCH2"
CLIENTIP="$MATCH4"
}
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
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users