7 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Trouble with maildrop...
FromSent OnAttachments
Benedikt HallingerSep 26, 2007 12:53 am 
Tony EarnshawSep 26, 2007 3:50 am 
Tony EarnshawSep 26, 2007 4:31 am 
Benedikt HallingerSep 26, 2007 4:39 am 
Tony EarnshawSep 26, 2007 4:57 am 
Benedikt HallingerSep 26, 2007 7:22 am 
Benedikt HallingerSep 30, 2007 7:45 am 
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: [maildropl] Trouble with maildrop2 and pcreActions...
From:Benedikt Hallinger (b.ha@gearfore.de)
Date:Sep 26, 2007 7:22:42 am
List:net.sourceforge.lists.courier-maildrop

O-k, did i understood you right, that the problem is caused, because i don't do the regex inside the if-statement? I give that a try.

The reason i did that was, because i thought, that i cant use the braces inside the if, because the if itself uses braces. But maildrop -V gives no parsing error - my coming testmails will show if it works.

Thanks so far, and please correct me if i am wrong!

On Wed, 26 Sep 2007 13:58:00 +0200, Tony Earnshaw <ton@hetnet.nl> wrote:

Benedikt Hallinger skrev, on 26-09-2007 13:39:

The problem is not the match capturing, inside the if-block i test for the score. Regarding the (hits|score) you are right, this could be implemented.

The whole problem is however, that expression =~ /regex/ gives "" where it should only give "1" or "0". I have no clue why.

Oh shoot, I wasn't thinking straight, I was simply looking at the regexp.

I don't think you can do what you're doing, you're trying a Perl thingy. Try:

if ( /^X-Spam-Status:\s*Yes,\s*(?:hits|score)=(?:\d+)\./:h ) { to $SPAMFOLDER }

That should give you a 1 or 0/true or false. Depending on how you define $SPAMFOLDER, of course.

--Tonni