Magnus Bäck wrote:
On Wednesday, July 01, 2009 at 07:02 CEST,
     Rob Brandt <bro...@csd-bes.net> wrote:


Sahil Tandon wrote:

I prefer pcre:, but the following patterns should work with regexp:
as well.

No, {n} isn't supported by regexp.

/^Subject:.*\*{3}SPAM\*{3}/ DISCARD ***SPAM***

/^X-Spam-Flag: YES$/ DISCARD Spam Flag
Still doesn't seem to be working.  Still using regexp, it seems I
don't have pcre installed as postfix throws errors when I try it.

"postconf -m" indicates which map types are supported.

I'm focusing on the X-Spam-Flag one since they both should eliminate
the same emails anyway.  I've tried it both with the colon and
without.  Is here a log somewhere where I can see what's going on?

You can use "postmap -q" to test input strings. The following patterns
are regexp-compatible:

/^Subject:.*\*\*\*SPAM\*\*\*/     DISCARD ***SPAM***
/^X-Spam-Flag: YES$/              DISCARD Spam Flag

Test them with "postmap -q" first. If it doesn't work you need to
provide an example email with these headers.

Please do not top-post.


Thanks.  postconf -m confirms that I have regexp but not pcre.

Could I get an example of how to use postmap -q?  I have tried:

postmap -q "X-Spam-Flag: YES" /etc/postfix/header_checks

where "X-Spam-Flag: YES" is the header I am trying to check and /etc/postfix/header_checks is the current name of my header_checks file. I get no return values, I've read the man and I think I'm supposed to get a 0 when it matches.

Rob

Reply via email to