intercepting smtp email

Peter Hansen peter at engcorp.com
Wed Oct 1 13:46:45 EDT 2003


Scott Hathaway wrote:
> 
> I want to write an NT service that will intercept any outgoing smtp
> traffic, like Norton Antivirus does.  Can anyone tell me how I can do
> something like this in Python?  I do not know how to intercept the
> outgoing traffic, specifically.

Normally a mail program does not connect directly to the receiving
server, but sends all mail via a "relay" server which talks SMTP.
For example, if you have an ISP connection, your mail would go through
their server, which would forward it to the appropriate final destination.

Why do you need to *intercept* SMTP traffic, when you could simply
modify the "outgoing server" setting for your mail program, and then
run a proxy SMTP server which would receive your mail, do the processing
you want, then forward the results to the original server?

-Peter




More information about the Python-list mailing list