On 2002-12-10, 10:48:07 (-0000), firstname.lastname@example.org wrote:
> Hi, I am looking at how to parse MIME messages and accordingly either insert
> new MIME elements or add text / html to MIME parts, usijng a procmail
> I am finding that this is a complex task - but one that has already been
> solved by the Anomy Sanitizer which routinely does exactly what i am seeking
> to do with great difficulty.
> Doess anybody know if there any way to use the these Anomy features
> separately, outside of the main Anomy function, or do I have to re-invent
> this wheel? Are there perhaps Anomy modules that can be divided out?
The Anomy::MIMEStream module does what you want, although it's
interface isn't properly documented anywhere.
If you take a look at the simplify.pl script distributed with the
sanitizer, then you can get a feel for how the MIMEStream module works
when used as a parser. The simplify script is much simpler than the
Sanitizer, should be easier to read.
Once you've got a feel for that, you could try and decifer the
Sanitizer itself. :-)
-- Bjarni R. Einarsson PGP: 02764305, B7A3AB89 email@example.com -><- http://bre.klaki.net/
Check out my open-source email sanitizer: http://mailtools.anomy.net/ Spammers, please send plenty of email to: firstname.lastname@example.org