[Pymilter] Obtaining email attachments for external processing

Jim Chrisos jchrisos at hotmail.com
Thu Sep 29 10:49:11 EDT 2011


All,

I am new to pymilter and despite writing many python scripts, I cannot, for the life of me, figure out how to obtain email attachments.

I've added a "data" function in the sample.py script since 'data' is one of the sendmail milter callbacks and in test emails I am able to get into that function.  But as far as extracting attachments for parsing with other tools of mine, I'm at a loss.  I've tried examples from other sample scripts such as check_attachments and message_from_file from the mime package but I still can't figure it out.  I was thinking I should be able to get the attachment(s) in relatively few lines of code which I could then hand off to my other tools, but am I mistaken?  Can anyone provide any samples to help me out?

Thanks in advance for any assistance anyone can provide.

Jim
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20110929/27c7ef97/attachment.html>


More information about the Pymilter mailing list