Sahil Tandon wrote:
On Tue, 30 Jun 2009, Rob Brandt wrote:
I'm trying to set up a basic header check to get rid of emails sa marks
as spam. I've added the following link to main.cf:
header_checks = regexp:/etc/postfix/filter
I prefer pcre:, but the following patterns should work with regexp: as well.
I was thinking pcre instead of regexp when I replied. Yes, I also
suggest pcre.
# No ***SPAM***
/^Subject .*\*\*\*SPAM\*\*\*/ DISCARD ***SPAM***
/^Subject:.*\*{3}SPAM\*{3}/ DISCARD ***SPAM***
# SPam flag
/^X-Spam-Flag .YES/ DISCARD Spam Flag
/^X-Spam-Flag: YES$/ DISCARD Spam Flag
Maybe it's not necessary, but I've always seem to have better luck with
Perl compatible regular expressions (as a general rule, not necessarily
just with Postfix pcre) when I escape the hyphens (i.e. "\-"). I suppose
if Postfix works without them, great. The simpler you can keep things,
the better.