[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vps-mail] Eliminate all attachements
- Subject: Re: [vps-mail] Eliminate all attachements
- From: Scott Wiersdorf <scottw@xxxxxxxxxxxx>
- Date: Fri, 5 Sep 2003 17:10:08 -0600
On Fri, Sep 05, 2003 at 03:42:12PM -0700, Mark A. Sharkey wrote:
> Is there a procmail rule to eliminate all email attachments, regardless
> as to their extension?
Well, it depends on what you consider an "attachment". For example,
many email clients attach a text/plain and a text/html part to
messages (called mime-multipart or multipart/alternative); do you want
to block those?
It is possible to block all MIME messages, but nearly all clients do
mime nowadays, so I would think that is not what you're after.
We'll assume that you want to allow messages with text mime parts only
(i.e., if there's any other kind of mime part it should be blocked or
stripped).
Do you want to strip off the attachment and let the rest go through
or simply block anything with a non-text mime part?
If you want to block anything with a non-text mime part, you could do
something like this:
## this is a space and a tab between two square braces
WS=[ ]
:0
* H ?? ^Content-type:
{
:0:
* ! B ?? Content-Type:${WS}*text
/var/mail/non-text-attachment
}
(this is untested, btw).
Stripping the attachment would require a mime-aware splitter
(mime-defang, etc.) to yank that stuff out. You may also wish to look
at The Sanitizer:
http://www.impsec.org/email-tools/procmail-security.html
Scott
--
Scott Wiersdorf
scottw@xxxxxxxxxxxx
======================================================================
Technical questions regarding this list may be sent to
<vps-mail-owner@xxxxxxxxxxxx>. You may request an automated help
response by sending an email with the word 'help' (w/o quotes) in the
BODY of the message (subject is ignored) to <vps-mail-request@xxxxxxxxxxxx>.
======================================================================
Main Index |
Thread Index