Mail body munging: state of the art?

paddy paddy at panici.net
Wed Jan 18 13:02:25 GMT 2006


On Wed, Jan 18, 2006 at 12:40:49PM +0000, Andy Armstrong wrote:
> I'm playing with an idea that I've been mulling over for a while. I  
> suppose you could call it a kind of CRM. The idea is that I have a  
> mail filter running on my server that can annotate incoming mail in a  
> number of ways - the thing I'm playing with for the proof of concept  
> is to look the From: address up with the Flickr API and then, if the  
> sender has a Flickr account include a link to it at the foot of the  
> email. In general I want to use it to attach arbitrary factoids about  
> the sender to my incoming mail.
> 
> I want to be able to add annotations in a way that works reliably  
> regardless of the format of the mail - if it's a multipart mail with  
> HTML and plain text versions I'd like to add the annotation to both  
> versions for example.
> 
> What should I be using? What's the state of the art for parsing /  
> modifying / recreating mail?

perl?  ;)

FWIW, a recent MailScanner shipped with:

Archive-Zip-1.14.tar.gz
Compress-Zlib-1.34.tar.gz
Convert-BinHex-1.119.tar.gz
Convert-TNEF-0.17.tar.gz
ExtUtils-MakeMaker-6.30.tar.gz
File-Spec-0.82.tar.gz
File-Temp-0.16.tar.gz
HTML-Parser-3.45.tar.gz
HTML-Tagset-3.03.tar.gz
IO-stringy-2.108.tar.gz
MIME-Base64-3.05.tar.gz
MIME-tools-5.417.tar.gz
MailScanner-4.49.7-1.tar.gz
MailTools-1.50.tar.gz
Net-CIDR-0.10.tar.gz
TimeDate-1.1301.tar.gz
tnef-1.3.4.tar.gz

and debian sarge lists the depends as

Depends: exim4 | mail-transport-agent, spamassassin (>= 2.11), unzip, 
 ncftp | wget, ucf (>= 1.08), perl (>= 5.8.4),libarchive-zip-perl (>= 1.14), 
 libconvert-tnef-perl, libhtml-parser-perl, libmime-perl (>= 5.414), 
 libnet-cidr-perl, libcompress-zlib-perl (>= 1.33), libconvert-binhex-perl

How will this interact with stuff like pgp signed mail ...
can you add your annotations outside the signature ?

Regards,
Paddy
-- 
Perl 6 will give you the big knob. -- Larry Wall


More information about the london.pm mailing list