Automatic email checking - best procedures/suggestions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Clements

    #1

    Automatic email checking - best procedures/suggestions

    Hi All,

    I'm hoping someone has some experience in this field and could give me
    a pointer in the right direction - it's not purely python related
    though. Any modules/links someone has tried and found useful would be
    greatly appreciated...

    I want to have an automated process which basically has its own email
    account on the LAN. The basic idea is that upon receipt of an email, it
    logs this in a database and then forwards the message on to 'suitable'
    recipients. (Well it will do more, but this is perfect to be going on
    with and buildable on...)

    The database and email account are set up and working fine. Using
    smtplib, imaplib or poplib I can send and receive mail - this is not a
    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

    Cheers,

    Jon.

  • Jorge Godoy

    #2
    Re: Automatic email checking - best procedures/suggestions

    "Jon Clements" <joncle@googlem ail.comwrites:
    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@gmail.c om>

    Comment

    Working...