I am writing an email parser for python 2.7 that will be called via sendmail using an alias, parsed using the email module, and then processed and stored in the oracle database:
From / etc / aliases:
myalias: | / my / python / script.py
I had the problem of "plundering" all stdin into a string object that I can use with the email module:
import email
message =
msg = email.message_from_string(message)
print msg['Subject']
What would be the most effective way to do this? I tried stdin.readlines (), but it gets on the list.
. (, noobish... perl python, script. "", - , , )