[spambayes-dev] Whitelists (was: A spectacular false positive)

Matthew Dixon Cowles matt at mondoinfo.com
Sat Nov 15 14:20:16 EST 2003


> Questions:
>
> o How to get the actual address from a To/From header - the address
> would need separating from the real name and any quoting.

That one's pretty easy:

>>> import email
>>> import email.Utils
>>> f=open("test")
>>> m=email.message_from_file(f)
>>> email.Utils.parseaddr(m.get("From",""))[1]
'richie at entrian.com'

Regards,
Matt




More information about the spambayes-dev mailing list