email scanning for X-Spam-Score

Helmut Jarausch jarausch at
Mon May 25 06:59:21 EDT 2009


my emails received from our mailing system contain a field like

X-Spam-Score: -2.2

Given the full email message in 'msg'
I've tried
   mailmsg = email.message_from_string(msg)
   SPAM_CORE = mailmsg['X-Spam-Score']
but it doesn't work.
What am I missing?

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

More information about the Python-list mailing list