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:Tony Earnshaw (ton@hetnet.nl)
Date:Sep 26, 2007 4:57:37 am
List:net.sourceforge.lists.courier-maildrop

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