procmail
[Top] [All Lists]

Re: Advanced file filtering

2001-07-30 17:40:27
At 16:37 2001-07-30 -0700, A. Rivera wrote:
I want to be able to remove attachments from incoming mail, but still send the rest of the email to the receipient. I don't want to /dev/null the whole thing.

Well, the keyword is "mime" - the type of encoding most attachments these days come in. If you search the archives for that, you should find a number of related hits.

I know that "stripmime", a handy perl script that will process the MIME message and strip out attachments (conveniently including a stub in the message indicating that an attachment was removed), should accomplish basically what you're asking to do.

The post I mentioned it in can be found in the list archives:

<http://www.xray.mpe.mpg.de/mailing-lists/procmail/2001-04/msg00003.html>


Note that UUENCODED or BINHEX'd in-body style attachments will not be filtered with such a mechanism, though a bit of coding (either within procmail, or the stripmime helper application), you could trim out UUENCODED blocks.


I just checked the URL in my previous post, and the original author of the utility has updated the script to strip out HTML from message bodies as well (I didn't examine it to see if it is an option or not, but a bit of coding would make it so if it wasn't already).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>