Hi all,

Have been a wee bit quiet recently as my new contract fires me all over the country most weeks. However I have a linux question.

If given a text file which is a forward of an email, headers and all, is there a program which will parse it and successfully extract the senders, reply to, from, subject ... in the same manner that the mail programmes must parse the received packets to find the data required in the headers for them to make sense of the email and route it?

The problem I am facing is that looking at forwarded emails I need to parse the forwarded text headers and find who it was from and also if their reply to is different to the sent from. There are a number of conventions for how reply to, sendto, from tags are displayed and formatted. I could write my own parser but if the code which does it for mail programmes or another programme already does it why rebuild the wheel.

I already have a parser written which takes text files and turns them into nodes much the same way an XML validator steps through nodes but it is the recognition of the headers I don't want to have to re-write.

Failing that do you now where the definitive list of valid header formats resides?

Any thoughts?

TIA

Shane


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.7/70 - Release Date: 11/08/2005

Reply via email to