SMTPRecipientsRefused not handled in zope.sendmail

Bug #1003288 reported by Andrey Lebedev
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
zope.sendmail
Fix Released
Undecided
Tres Seaver
zope.sendmail (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Sometimes, during mail delivery in QueueProcessorThread, SMTP server rejects mail because of bad recipient. For example, it can happen if recipient looks like local one (without @ in email), so SMTP server will not put incoming email to its queue and will reject it during SMTP conversation. This condition is detected by smtplib and smtplib.SMTPRecipientsRefused will be raised.

Unfortunately, zope.sendmail.queue.QueueProcessorThread does not handle this type of exception and delivery will be reattempted after 3 hours. This cycle repeats forever, which is undesirable.

The attached patch will treat SMTPRecipientsRefused as permanent failure and remove email from mailbox, so its delivery will be stopped.

Related branches

Revision history for this message
Andrey Lebedev (andrey-lebedev) wrote :
affects: zope3 → zope.sendmail
Tres Seaver (tseaver)
Changed in zope.sendmail:
assignee: nobody → Tres Seaver (tseaver)
status: New → Confirmed
Revision history for this message
Tres Seaver (tseaver) wrote :

Thanks for the patch! Committed, with an additional test, to the 3.7 branch:

 http://svn.zope.org/zope.sendmail/branches/3.7/?rev=126451&view=rev

and the trunk:

 http://svn.zope.org/zope.sendmail/trunk/?rev=126453&view=rev

Changed in zope.sendmail:
status: Confirmed → Fix Committed
Tres Seaver (tseaver)
Changed in zope.sendmail:
milestone: none → 3.7.5
Revision history for this message
Andrey Lebedev (andrey-lebedev) wrote :

Tres, thanks for the fast respose!

Tres Seaver (tseaver)
Changed in zope.sendmail:
status: Fix Committed → Fix Released
Logan Rosen (logan)
Changed in zope.sendmail (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zope.sendmail - 3.7.5-0ubuntu1

---------------
zope.sendmail (3.7.5-0ubuntu1) quantal; urgency=low

  * New upstream release.
    - Fixes "queuedDelivery should be overridable." (LP: #191143)
    - Fixes "SMTPRecipientsRefused not handled in zope.sendmail." (LP: #1003288)
  * Bump Standards-Version to 3.9.3.
 -- Logan Rosen <email address hidden> Sun, 15 Jul 2012 19:07:58 -0400

Changed in zope.sendmail (Ubuntu):
status: Fix Committed → 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.