13 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Seeming issue bet...
FromSent OnAttachments
Mitch (WebCob)Jan 6, 2004 5:07 pm 
Gordon MessmerJan 6, 2004 6:06 pm 
Sam VarshavchikJan 6, 2004 6:49 pm 
Mitch (WebCob)Jan 6, 2004 11:29 pm 
Mitch (WebCob)Jan 6, 2004 11:29 pm 
Gordon MessmerJan 7, 2004 10:31 am 
Sam VarshavchikJan 7, 2004 3:52 pm 
Mitch (WebCob)Jan 7, 2004 4:37 pm 
Mitch (WebCob)Jan 8, 2004 9:46 am 
Gordon MessmerJan 8, 2004 12:39 pm 
Mitch (WebCob)Jan 8, 2004 2:08 pm 
Mirko ZeibigJan 8, 2004 7:56 pm 
Mitch (WebCob)Jan 8, 2004 11:08 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
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?Actions...
From:Gordon Messmer (yiny@eburg.com)
Date:Jan 8, 2004 12:39:39 pm
List:net.sourceforge.lists.courier-users

Mitch (WebCob) wrote:

Received: from a1200 ([24.83.X.X]) (AUTH: LOGIN mit@XXX.com) by bigass1.XXX.com with esmtp; Thu, 08 Jan 2004 00:04:43 +0000 ... if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: [^)]*\) *by/) ) ... So the first .* catches all characters up to the escaped "(AUTH: "

Yes.

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

When ^ appears as the first character inside [], it means characters not in that set. '[^)]' means characters which are not a ')'.

I tried rewriting it as: if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: .*\) *by/) )

That'll usually accomplish the same, but it'll take longer. It's key to writing fast regexs that you avoid .* as often as you can.

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

Should be. The pattern works for me, though the rest of my conditional is different.

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

It's probalby related to the !. You may need an additional set of parens around the $MATCH =! //. Either that, or MATCH doesn't have the whole line, and what you really need is "foreach /Received: .*/".