This is a discussion on Re: Ignore attachements with body_checks? within the mailing.postfix.users forums, part of the Mail Servers and Related category; At 02:36 PM 11/11/2004, Kevin Collins wrote: >The biggest problem with this is that the attachment ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
At 02:36 PM 11/11/2004, Kevin Collins wrote:
>The biggest problem with this is that the attachment is seen as a giant >string of ASCII garbage that *sometimes* spell words that my >'body_checks' are hitting. Like the other day I had a legit e-mail with >an attachment that got killed because of the string "POrN" was in that >random conglomeration that the attachment was encoded with. > >I want Postfix to kill the e-mails that do NOT have attachments, but do >have the words "porn" in them. > >If I could get postfix to simply not apply the rules in 'body_checks' to >ALL the e-mails that have attachments with them, that would accomplish >what I'm after. Add this near the top of your body_checks. It prevents postfix from looking for matches within base64 encoded lines. # Skip over base 64 encoded blocks. This saves lots of CPU cycles. # Expressions by Liviu Daia, amended by Victor Duchovni. ~^[[:alnum:]+/]{60,}\ *$~ OK -- Noel Jones |