12 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Re: Postfix - Maildro...
FromSent OnAttachments
Luis PenaMay 1, 2002 8:00 pm 
Charlie WattsMay 2, 2002 6:36 am 
Luis PenaMay 3, 2002 10:48 am 
Charles J. BoeningMay 3, 2002 1:27 pm 
Luis PenaMay 3, 2002 4:00 pm 
Charles J. BoeningMay 3, 2002 4:18 pm 
Luis PenaMay 3, 2002 4:23 pm 
Marcus FringsJun 14, 2003 2:03 am 
Matthias AndreeJun 15, 2003 6:23 am 
Marcus FringsJun 20, 2003 4:26 am 
Matthias AndreeJun 21, 2003 3:07 am 
Marcus FringsJun 21, 2003 5:15 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] Re: Postfix - Maildrop - SpamAssassinActions...
From:Matthias Andree (ma@dt.e-technik.uni-dortmund.de)
Date:Jun 15, 2003 6:23:44 am
List:net.sourceforge.lists.courier-maildrop

Marcus Frings <iam-@fuckmicrosoft.com> writes:

/*** begin mailfilter file ***/ import EXT import HOST import HOME MAX = 15

[...]

These import EXT, HOST and HOME from the environment (I wonder why he imports HOME though -- perhaps because maildrop resets it to the default).

if ((/^X-Spam-Status: Yes, hits=![0-9]+\.[0-9]+!.*/:h && $MATCH2 > $MAX)) { exit }

I guess I will never completely understand the full syntax of regular expressions and maildrop's filter language so I hope you could help me to understand the recipe above. As far as I understand it tests the "X-Spam-Status"-line if the required hits are greater than 15 and then just exits. But why would anyone do so? And why is "((...))" used and not only "(...)"?

I don't think (( )) makes a difference. The exclamation points you see split up the regular expression -- see man maildropfilter, section "PATTERN MATCH RESULTS". Effectively, this checks if a header matching ^X-Spam-Status: Yes, hits=[0-9]+\.[0-9]+ exists, and if it does, it extracts the number after hits into $MATCH2, and then the expression checks if the number so extracted is greater than $MAX (15) -- if it does, the mail is dropped (exit).