Mike, if you are not overly fond of regular expression and/or want more
control over the output I am happy to share a program I wrote in my early
python days. 
It goes through a(several) textfile(s) and scans for anything that looks
like an email address.

The first level of reporting shows the result in 4 tables for
 [unique, duplicate, excluded, fragment]  addresses each
 - unique: most relevant / search not case sensitive, but report preserves
case (-:
 - duplicates: most the time those are of no interest
 - excluded: e.g. things like 
'[EMAIL PROTECTED]' from YOUR original
mailheader ( this still needs a bit of work)
 - fragment: anything broken with an @-sign 

You can list and/or sort-by  user, domain, original textline, line-number
in original file, ...

The second level of reporting shows a diff of two data sets for the 4
different tables above (though only 'unique' makes sense -this needs some
work too)

The third level of reporting decorates the output to what you want,
e.g. to  quoted, comma separated values. That's what I use it for once a
week to extract a few hundred 'User | Host unknown' from our maillog and
feed those into SQL:
"delete from ... where EMail in ( '[EMAIL PROTECTED]', ...);"

Maybe that's overkill for what you need; and as I said it's from my early
python days (so I won't embarrass myself in public) -but lemme know if
interested (python 2.x required) .................. Horst.



On Wed, 18 Sep 2002, Mike O wrote:

> Okay, no wisecracks or stupid jokes on that one though
> I'm sure somebody won't be able to help themselves. 
> 
> Here's what I'm looking for. Anybody know of a program
> that'll go through all the headers in an email and
> output all of the email addresses in it to a file or
> address book?
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> _______________________________________________
> Eug-lug mailing list
> [EMAIL PROTECTED]
> http://mailman.efn.org/cgi-bin/listinfo/eug-lug
> 

_______________________________________________
Eug-lug mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to