SMTP authentication

Hi All,
We are trying to use our authenticated SMTP server headers to ensure people cannot spoof email addresses in mailman.
We want to insert a script which when inserted into the mailman.aliases file will check for authentication and insert a header, then use maiman to check for this header and send/discard.
How in python do i parse a whole email into an email.Message() object?
I can seem to do it in pieces but not as a whoile email.
Cheers
-- Jeffrey Borkent Systems Specialist Information Technology Services University of Adelaide Level 7, 10 Pultney Street Adelaide. 5005 Ph: 8303 3000 jeffrey.borkent@adelaide.edu.au
CRICOS Provider Number 00123M
This email message is intended only for the addressee(s) and contains information that may be confidential and/or copyright. If you are not the intended recipient please notify the sender by reply email and immediately delete this email. Use, disclosure or reproduction of this email by anyone other than the intended recipient(s) is strictly prohibited. No representation is made that this email or any attachments are free of viruses. Virus scanning is recommended and is the responsibility of the recipient.

On Sun, 2005-07-24 at 19:23, Jeffrey Borkent wrote:
How in python do i parse a whole email into an email.Message() object?
You can use email.message_from_string() or .message_from_file(), but I'm not sure you'll need to do this. The Mailman part that you'll want to write will likely be a "handler", in which case you'll get a Mailman.Message object passed to you already parsed. This is just a subclass of email.Message.Message.
-Barry

On Sun, 2005-07-24 at 19:23, Jeffrey Borkent wrote:
How in python do i parse a whole email into an email.Message() object?
You can use email.message_from_string() or .message_from_file(), but I'm not sure you'll need to do this. The Mailman part that you'll want to write will likely be a "handler", in which case you'll get a Mailman.Message object passed to you already parsed. This is just a subclass of email.Message.Message.
-Barry
participants (2)
-
Barry Warsaw
-
Jeffrey Borkent