Email Bounce Detection

madhav madhav.bnk at gmail.com
Fri Jun 27 09:03:15 CEST 2008


Hello everybody, I need a mechanism to detect email bounces. I tried
browsing through smtplib implementation and found not helpful in this
case. Actually it is said in the documentation that if a mail is sent
to say: "somerandomname at randomorg.com", then "_send()" in the
SMTPConnection class returns 550(Unknown recceipient). I checked the
same but its not returning 550 and return 250(receipient ok).
Later, I tried getting the smtp error code from the mail body of a
bounced msg. the "Message" class doesnot have any error code attribute
by default. We need to get it from the mailbody(by regex ing), which i
think is not a valid solution, as "550" can occur anywhere in the body
of any message otherthan the bounced msg also.
Please help me regarding this.
Thanks in advance.




More information about the Python-list mailing list