SMTPRecipientsRefused not handled in zope.sendmail

Bug #1003288 reported by Andrey Lebedev on 2012-05-23
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Tres Seaver
zope.sendmail (Ubuntu)

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

Andrey Lebedev (andrey-lebedev) wrote :
affects: zope3 → zope.sendmail
Tres Seaver (tseaver) on 2012-05-23
Changed in zope.sendmail:
assignee: nobody → Tres Seaver (tseaver)
status: New → Confirmed
Tres Seaver (tseaver) wrote :

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

and the trunk:

Changed in zope.sendmail:
status: Confirmed → Fix Committed
Tres Seaver (tseaver) on 2012-05-23
Changed in zope.sendmail:
milestone: none → 3.7.5
Andrey Lebedev (andrey-lebedev) wrote :

Tres, thanks for the fast respose!

Tres Seaver (tseaver) on 2012-05-23
Changed in zope.sendmail:
status: Fix Committed → Fix Released
Logan Rosen (logan) on 2012-07-15
Changed in zope.sendmail (Ubuntu):
status: New → Fix Committed
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  Edit
Everyone can see this information.

Other bug subscribers