On 7/2/2014 5:47 PM, Axel wrote:
> Hello,
> 
> I'm using postfix 2.9.6 on Debian 7 with an antispam body_checks
> configuration like this:
> 
> === main.cf ===
> body_checks = pcre:/etc/postfix/body_checks.pcre
> ===

Maybe you have body_checks defined more than once in main.cf. Check
the setting postfix uses with
# postconf body_checks

Any warnings being logged by postfix?


> 
> === body_checks.pcre ===
> /Operationsmanager/     REJECT Spam not tolerated here. Rule 909
> /mix.dj/                REJECT Spam not tolerated here. Rule 910
> [...]
> ===

Are these your actual rules?  Single-word spam filters are highly
likely to cause false positives. Not recommended!

And the "." is a wildcard character.  If you really mean a period,
escape it with a backslash -- /mix\.dj/  Note that will also match
remix.djoin, etc. since there's no boundaries.


> 
> A check with postmap confirms the correct lookup result:
> 
> # postmap -q "mix.dj" pcre:/etc/postfix/body_checks.pcre
> REJECT Spam not tolerated here. Rule 910
> 
> The problem:
> When sending a simple email with "mix.dj" in the body (data after a
> "Subject:" line) the mail
> does not get rejected, instead it passes through without problems.

It's unclear exactly how you're testing, so maybe your test is flawed.


> 
> What am I missing here? In my opinion the rule should match an
> reject the mail. But why doesn't
> this happen?

One common reason header/body checks don't work as expected is they
don't match the input... the actual email is base64 or otherwise
encoded and what you see in your mail reader isn't really what's in
the raw file processed by postfix.



  -- Noel Jones

Reply via email to