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