procmail
[Top] [All Lists]

Re: Filtering out unwanted mime attachments

1997-10-12 08:11:45
Rob Vandeweyer writes on 12 October 1997 at 16:45:14
On Sun, 12 Oct 1997, J. Daniel Smith wrote:

Rob Vandeweyer writes on 12 October 1997 at 12:39:23
[...]
Just kill all attachments:
:0
* ^Content-Type: multipart/
/dev/null

This will cause you to never see multipart/alternative messages (e.g.,
the same message in both ASCII text and HTML formats).

Yes, I know, but he said it was for a mailing list, and I think this is
the best for a mailinglist... HTML codes will wast much to much space (in

I always hate seeing procmail recipes that for whatever reason loose
what might well be perfectly good mail; this is one such recipe.  MIME
is a complex beast, attacking it with simple procmail recipes is
asking for problems, such as the loss of mail which is presumably one
of the reasons for using procmail to begin with.

Something along the lines of
   :0hbfw
   * ^Mime-Version:
   * ^Content-Type:[    ]*multipart/alternative
   | extract_text_portion
Where "extract_text_portion" is some MIME-aware filter that will
extract the text/plain part of a multipart/alternative message.  If
you *still* have a multipart message after this filter, *then* it
might be OK to drop it.

Greetz,
Rob Vandeweyer

groetjes,
   Dan
------------------- message is author's opinion only ------------------
J. Daniel Smith <DanS(_at_)bristol(_dot_)com>        
http://www.bristol.com/~DanS
Bristol Technology B.V.                   +31 33 450 50 50, ...51 (FAX)
Amersfoort, The Netherlands               {info,jobs}(_at_)bristol(_dot_)com