Script performance: Filtering email

Skip Montanaro skip at mojam.com
Tue Jan 16 05:55:32 EST 2001


    Sheila> Strangely enough, these missing e-mails eventually
    Sheila> appeared. Some of them, over an hour from the time they hit my
    Sheila> web host's mail servers until they hit my mailbox. Some of them
    Sheila> about a half hour. Some about seven minutes.

    Sheila> Could my little 26 line Python script be causing this? It
    Sheila> doesn't seem that 45 minutes to an hour is about normal for an
    Sheila> email to go through on my web host.  Performance there is
    Sheila> usually very good, and I never saw it take that long before.

Most likely it was due to congestion at your web host's mail servers.  To
figure this out, simply check the timestamps in the Received headers to see
when the message(s) in question got to what intermediate host(s).

BTW, someone already wrote a fairly sophisticated spam filter in Python.  It
uses a somewhat different model than yours (I think it actually runs as an
intermediary SMTP server), but it may have some tricks you could employ,
even if you couldn't use it lock-stock-and-barrel.  Check the Vaults of
Parnassus for details.

-- 
Skip Montanaro (skip at mojam.com)
Support the Mojam.com Affiliates Program: http://www.mojam.com/affl/
(847)971-7098




More information about the Python-list mailing list