zope.sendmail doesn't handle SMTP errors

Bug #157104 reported by Marius Gedminas
4
Affects Status Importance Assigned to Milestone
Zope 3
Fix Released
Undecided
Unassigned

Bug Description

If you try to send an email with a malformed sender/recipient address, the SMTP server will reject it, smtplib will raise a smtplib.SMTPRecipientsRefused exception, and the blanked except clause in zope.sendmail.delivery will log it and continue trying to re-send the same malformed message every 3 seconds.

If you use mail:directDelivery instead of mail:queuedDelivery, that exception will happen (and be uncaught) in the second phase of the transaction commit, which can't be good either.

Revision history for this message
Matthew Grant (grantma) wrote :

zope.sendmail also does not handle these events gracefully:

o SMTP Error 45x - temporary error

o Temporary failure to connect() to the MTA to start delivery of a message

o Failure of SMTP TCP connection during SMTP session

I am just finishing writing code that will handle all this gracefully, I will add the SMTPRecipientsRefused Exception handling to it as well.

Revision history for this message
Albertas Agejevas (alga) wrote :

The fix for the permanent errors has been comitted in rev 82358 (end of December 2007), released in zope.sendmail 3.5.1.

Changed in zope3:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.