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