Pruning e-mail attachments.
Brian
gnhlug at karas.net
Fri Mar 31 19:56:01 EST 2006
Congratulations on increasing the local population density just a bit in
favor of the smart people :)
As for the attachments, ISTR when I was mucking around with something mildly
related a few years back you could grep for something like "multipart
boundary" in the headers. This identifies a random-ish string that
separates the text part of the message from the non-text (HTML and/or
attachments). Not sure if you want to strip HTML as well, but I think if
you look around in that fashion you could write a quick and dirty attachment
stripper. Just make sure to stuff a dollar it the g-string if it works...
> -----Original Message-----
> Hello, all -- first and foremost, I'm pleased to announce the
> birth of Isabella Francesca D'Ambrosio -- for those with
> places in their hearts for baby pics, have at:
> http://flyingtoasters.net/gallery/album26?page=4
> . Now that the birth done with, I hope to be able to make
> impending meetings again (what with all my new-found spare
> time </sarcasm>).
>
> And now for the actual on-topic stuff: I've got a Blackberry
> user who gets inbound e-mail bounced from time to time
> because of large attachments. Since I route all his e-mail
> both to his IMAP account and the Blackberry, there's no
> reason I couldn't strip off the attachments
> -- *IF* I knew what it was that designated the start of an
> attachment.
> Upon looking at the raw text of a message, I remain somewhat
> ignorant.
> While I'm somewhat tempted to delve into the RFC's, if
> there's a quick-n-dirty way to find out where to start
> stripping off text, I'd appreciate being told about it.
>
More information about the gnhlug-discuss
mailing list