controling a Python daemon with mail

Preston Landers planders at mail.utexas.edu
Fri Apr 23 17:17:35 EDT 1999


Hey all...

I'm interested in writing a Python script that can be controlled by
email.  I've read all the relevant Library documentation and the FAQ
and searched the howto's but have not found some specific bits of
information I need.  That's when I turn to comp.lang.python. ;-) 

Periodically, I want my daemon to check a standard Unix mail spool
file for new messages.  Under certain conditions, I want the script to 
act on those messages (ie, do its thang on the contents of the message 
and mail the results back to the sender.)

I've looked at the mailbox.UnixMailbox package.  I am able to write a
script that retrieves each message in /var/spool/mail/myuser and
displays the sender, recipient, and subject.  I am able to generate a
reply using /usr/bin/mail.  But for the life of me, I cannot look at
the body of the incoming message.  Silly me.  Where in the
documentation is this describe?  10 points to anyone who can point out 
the specific place to me.  

Many thanks,

Preston Landers
Austin, Texas





More information about the Python-list mailing list