On Mon, 9 Jun 2003, Patrick Marquetecken wrote:

> I'm quit new with mail on linux, i have already this working:
> fetchmail - postfix - amavis - clamAV - spamassassin - procmail
>
> now i want to bounce or quarantine mails with some extentions, like exe
> ,src and so on. But i don't know where to start, so any advice would be
> fine.

We have the following pcre's in our Postfix body checks file:

/^Content-Disposition:
attachment;.*filename=".*\.(doc|xls|zip|exe|scr|jpg|gif|html?)\.(pif|bat|com|exe|lnk|html?)"$/s
REJECT

/^Content-Disposition:
attachment;.*filename=".*\.(asd|chm|dll|hlp|hta|js|ocx|pif|lnk|scr|shb|shs|vb|vbe|vbs|wsf|wsh|bat)"/s
REJECT

This is on a Debian Stable machine running Postfix 1.11.  Postfix 2.0 is
much more versatile in the handling of attachments (and can do more than
just REJECT messages).

The first rejects certain double extensions.  The second rejects all
messages with the listed extensions.  We, of course, have many many other
rules besides just these.  Of course, this is a little more effective, I
think, when postfix receives mail directly rather than fetchmail grabbing
the mail (so that messages are bounced by the mail server trying to send
to you).

I highly recommend looking at the various sites linked to by the Postfix
docs page (http://www.postfix.org/docs.html).

-- 
Marshal Newrock, Simon's Rock College of Bard
Caution: product may be hot after heating


--
[EMAIL PROTECTED] mailing list

Reply via email to