procmail
[Top] [All Lists]

RE: How to forward a message and strip attachments

2004-12-06 11:35:07
Stripmime does the trick.  Thanks for the tip.

-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE] On Behalf Of 
Professional
Software Engineering
Sent: Friday, December 03, 2004 11:55 AM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: How to forward a message and strip attachments


At 09:11 2004-12-03 -0500, Jerry Shenk wrote:
I know this can be done but it's got me stumped....It's pretty simple
too I'd guess.

I would like to forward mail to a user's Blackberry but he has a couple
people who regularly send some pretty large attachments and they're
costing a bunch and they're totally worthless on the Blackberry.  Is
there something I can do to strip all attachments?

For a learning experience, examine some raw mailbox messages and note
stuff 
like "Content-Disposition:"


A generic thing to do would be to not forward messages larger than so
many 
KB, since attachments tend to be the really large things, and text
messages 
should generally come in below some size threshold:

:0c
* < 10000
!blackberry(_at_)yourdomain(_dot_)tld


Alternatley, get yourself a program such as "stripmime" and pass all the

messages to be forwarded through it:

:0c
{
         :0f
         | stripmime.pl

         :0
         !blackberry(_at_)yourdomain(_dot_)tld
}


This would remove attachments from the messages, reducing them to plain 
text.  If you hack the stripmime source, you could have it leave HTML,
but 
still remove other attachment types.

---
  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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail





____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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