Automatic email checking - best procedures/suggestions

Jorge Godoy jgodoy at gmail.com
Thu Jul 27 07:31:34 EDT 2006


"Jon Clements" <joncle at googlemail.com> writes:

> problem. What I'm unsure of is the best way to design this. Bear in
> mind that network/email server configuration changes can be made. For
> instance, do I connect to the email server and keep polling it every
> 'n' whatever for new messages, or should I be looking to the smtpd
> module and get mail via that? (or any other way?)
>
> I think I'm basically after the best way to implement:
> Email in ------> Python process ------> Email out

It depends on your mail server, on what you're willing to do and also on how
"locked" to your mail server you want to be.

Certainly fetching messages from your mailserver through POP3 and reinjecting
them to the correct mailaccounts will be a more portable solution than
writing, e.g., a filter to your mailserver.

On the other hand, if you need the message processed as soon as it arrives you
can make your program a filter -- or have a filter to call it somehow -- to
process the message.

Also consider the startup time of your code for each processed message,
concurrency issues, etc. 

-- 
Jorge Godoy      <jgodoy at gmail.com>



More information about the Python-list mailing list