Thanks Mirko - I don't want to embarass my sorry regular expression
handicapped self, but I'm still confused:

Received: from a1200 ([24.83.X.X])
  (AUTH: LOGIN [EMAIL PROTECTED])
  by bigass1.XXX.com with esmtp; Thu, 08 Jan 2004 00:04:43 +0000

AND

if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: [^)]*\) *by/) )
->
/Received: .*\(AUTH: [^)]*\) *by/

So the first .* catches all characters up to the escaped "(AUTH: "

What's the [^)]* do in this case? I thought ^ was the start of a line?

I tried rewriting it as:

if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: .*\) *by/) )
AND
if ( $i == 1 && ( ! $MATCH =~ /Received: .*/) )

But that doesn't seem to match anything - is the Received line converted
back to a single line prior to this processing?

I would think so, maybe the problem is the if syntax and not the pattern?

Any further ideas appreciated.
Thanks.

m/

-----Original Message-----
From: Mirko Zeibig [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 08, 2004 12:17 AM
To: [EMAIL PROTECTED]
Cc: Mitch (WebCob)
Subject: Re: [courier-users] Seeming issue between SA & courier... WAS
RE: [SAtalk] RCVD_IN_DYNABLOCK,RCVD_IN_SORBS in 2.61 when sending myself
a test message?


Mitch (WebCob) said the following on 01/08/2004 01:37 AM:
> Ok - thanks - that works better for a number of reasons - (I'll post the
> running verison once I play with it) - by making sure I am testing the
first
> header, I don't need to care about example.com (which is good, cause then
I
> can put the rule in my maildroprc where I call spamassassin from.
>
> When I use your original example I get "Syntax error after =."
>
> #               if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: [^)]*\)
I guess you have to escape the parenthese in the square brackets as well:
\(AUTH: [^\)]*\)

Regards
Mirko



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to