On 11/13/2011 4:19 PM, Rich Shepard wrote:
>   A common form of spam comes with the body text in all uppercase
> letters.
> Perhaps the senders are all using Apple ][e computers. Anyway, if I
> add the
> following to /etc/postfix/body_checks will I unintentionally reject
> valid
> messages?
> 
> /[A-Z].*/


This is doomed to failure.

First, as documented, postfix header_checks and body_checks ignore
case by default.  To make them case sensitive, add a /i to the
expression.
/FOO/i

Secondly, your expression doesn't allow for things such as spaces or
numbers or punctuation; that can be fixed, but don't bother.
(Actually, your expression matches "one cap letter followed by
anything".  Obviously not what you intend.)

Now the bad news:
Remember that postfix body_checks evaluates the message *one line*
at a time.

So even a proper "match ALL CAPS" expression would reject any
message that has any one single line of all-caps text, such as
"WARNING"

This test is much better suited for SpamAssassin or some other
filter that can examine the whole body.  IIRC SpamAssassin already
includes tests for all-caps.




  -- Noel Jones

Reply via email to