Can anyone suggest a more efficient, and/or higher performance method of reading in a mail message as standard input, and then feeding the message to a command pipe (qmail in my case). I do need to examine the mail headers, but don't need to look at the message body at all. Here is what I'm doing currently: -------------------------------------------------------------------- import os, rfc822, cStringIO raw_message = sys.stdin.read() message = cStringIO.StringIO(raw_message) headers = rfc822.Message(message) # header examination and processing deleted inject_message = os.popen('/var/qmail/bin/qmail-inject','w') inject_message.write(raw_message) inject_message.close() -------------------------------------------------------------------- Thanks. -- My e-mail address represents an experiment in SPAM reduction. For more information, see <URL:http://jason.mastaler.com/tms>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4