Manipulating mailboxes

Donn Cave donn at drizzle.com
Wed May 25 01:16:55 EDT 2005


Quoth Laszlo Zsolt Nagy <gandalf at geochemsource.com>:
| I need to create a daemon that sits on a server and forwards some 
| e-mails. (Well not only that, it needs to change header information 
| before forwarding and also insert messages into a database). The mailbox 
| module is fine but I do not see a way to delete/add messages - it is 
| ready only. The other possiblity is IMAP4 but it is bad because my 
| program should not store passwords for all users.

Whether IMAP4 is actually suitable for your application I don't know,
but passwords don't have to be an issue.  If you run under the user's
ID on the mail server host, and you're using the UW imapd, you can
invoke imapd, instead of connecting to the service port, and in this
case it will be "pre-authenticated".  Protocol is the same, so you only
have to modify the imaplib module enough to give you a chance to set
up the initial connection.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list