Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Scripts for parsing Received: headers in emails

Thread Tools

Scripts for parsing Received: headers in emails

Benjamin Han
Posts: n/a
A while ago I asked if anyone knows a module for parsing Received: headers
in emails. Apparently my guess was wrong (that someone already wrote it in
Python). I got an email pointing me to Spambayes project, however the tokenizer
doesn't seem like doing a lot on the Received headers (especially when
comparing to SpamAssassin's code).

So I wrote a small set of scripts for doing this:

It's based on SpamAssassin's script, but I separated patterns
from the code. Patterns of all known headers are kept in a text database
file so new entries can be added without touching anything else.

I hope this is useful to someone else too - and of course any patch to
increase the coverage of the database is welcome!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with wsgiref.headers.Headers Phil Python 4 01-17-2010 04:47 PM
Server cannot clear headers after HTTP headers have been sent Ian ASP .Net Security 2 03-20-2007 09:00 AM
Stupid question: Making scripts python-scripts Jan Danielsson Python 8 07-22-2005 12:20 AM
Re: Stupid question: Making scripts python-scripts Jp Calderone Python 0 07-21-2005 02:38 PM
Reading 'received' headers: Email Headers Parsing dont bother Python 0 03-03-2004 08:18 PM