[Bug 319115] [NEW] Execution of queue is stopped when an SMTPRecepientRefuse is encountered

1 view
Skip to first unread message

G. Gozadinos

unread,
Jan 20, 2009, 3:13:31 AM1/20/09
to singing...@googlegroups.com
Public bug reported:

If an adress that does exist is inside the recipient list (which can
occur for instance if the csv imported has such entries, or if a domain
or email adress expires) an SMTPRecepientRefuse exception is thrown. In
which case delivery stops. I would think it should continue and maybe
even remove the bad entry.

** Affects: singing-dancing
Importance: Undecided
Status: New

--
Execution of queue is stopped when an SMTPRecepientRefuse is encountered
https://bugs.launchpad.net/bugs/319115
You received this bug notification because you are a member of Singing &
Dancing developers, which is the registrant for Singing & Dancing.

Status in Singing & Dancing: New

Bug description:
If an adress that does exist is inside the recipient list (which can occur for instance if the csv imported has such entries, or if a domain or email adress expires) an SMTPRecepientRefuse exception is thrown. In which case delivery stops. I would think it should continue and maybe even remove the bad entry.

Daniel Nouri

unread,
Jan 20, 2009, 10:44:02 AM1/20/09
to singing...@googlegroups.com
Can you provide a traceback?

** Changed in: singing-dancing
Assignee: (unassigned) => Daniel Nouri (daniel.nouri)

G. Gozadinos

unread,
Jan 21, 2009, 3:23:59 AM1/21/09
to singing...@googlegroups.com
Of course ;) I replaced domain and email adress with asterisks...

2009-01-21 10:37:23 CRITICAL txn.1123420496 A storage error occurred during the second phase of the two-phase commit. Resources may be in an inconsistent state.
2009-01-21 10:37:23 ERROR Zope.SiteErrorLog http://***/portal_newsletters/channels/newsletter-stats.html
Traceback (innermost last):
Module ZPublisher.Publish, line 125, in publish
Module Zope2.App.startup, line 238, in commit
Module transaction._manager, line 96, in commit
Module transaction._transaction, line 395, in commit
Module transaction._transaction, line 503, in _commitResources
Module zope.sendmail.delivery, line 78, in tpc_finish
Module collective.dancing.composer, line 413, in send
Module zope.sendmail.mailer, line 45, in send
Module smtplib, line 695, in sendmail
SMTPRecipientsRefused: {u'***@***': (450, '4.1.2 <***@***>: Recipient address rejected: Domain not found')}

yboussard

unread,
Jun 11, 2009, 5:18:38 AM6/11/09
to singing...@googlegroups.com
Hello,

I notice exactly the same problem. If there is an STMTP exception raised the process queue stop but dispatch is not notice of that.
In http://svn.plone.org/svn/collective/collective.singing/trunk/collective/singing/message.py the try, catch doesn't work in that case because of the architecture of zope.sendmail I guess.
I think that collective.dancing.composer.SMTPMailer.send must have an try, cache in that case.
Exception in smtplib are :

"SMTPException","SMTPServerDisconnected","SMTPResponseException",
"SMTPSenderRefused","SMTPRecipientsRefused","SMTPDataError",
"SMTPConnectError","SMTPHeloError","SMTPAuthenticationError",

SMTPRecipientsRefused and SMTPSenderRefused are not critical error for the dispatch process and I think they can be catch in the SMTPMailer.
In my case , recipients received hundred message of the same newsletter because the queue failed of a empty email address. The queue is never purge and the @@dancing.utils/tick_and_dispatch finish by blocking zope server.

The traceback :

INFO collective.singing Dispatching is locked by another process.
CRITICAL txn.16292 A storage error occurred during the second phase of the two-phase commit. Resources may be in an inconsistent state.

2009-05-25T09:48:09 ERROR Zope.SiteErrorLog
.../@@dancing.utils/tick_and_dispatch

Traceback (innermost last):

Module ZPublisher.Publish, line 125, in publish

Module Zope2.App.startup, line 238, in commit

Module transaction._manager, line 96, in commit

Module transaction._transaction, line 395, in commit

Module transaction._transaction, line 503, in _commitResources

Module zope.sendmail.delivery, line 87, in tpc_finish

Module collective.dancing.composer, line 376, in send

Module zope.sendmail.mailer, line 72, in send

Module smtplib, line 695, in sendmail

SMTPRecipientsRefused: {}

Thanks for your work !
Regards Youenn

Daniel Nouri

unread,
Aug 2, 2009, 2:53:50 PM8/2/09
to singing...@googlegroups.com
I would assume that queuedDelivery does not suffer from this problem.

http://pypi.python.org/pypi/collective.dancing#configuring-zope-
sendmail-to-send-out-messages

Patches happily accepted.

kalymero

unread,
Nov 1, 2009, 10:00:00 AM11/1/09
to singing...@googlegroups.com
I tried to reproduce this issue and it seems to work.

I injected the exception in the __call__ method of
collective.singing.mail.Dispatch class

------------------------
from smtplib import SMTPRecipientsRefused
if 'myad...@myserver.it' not in self._split(msg['To']):
raise SMTPRecipientsRefused('-> SMTPRecipientsRefused raised <-')
-------------------

and all goes fine. An email was correctly delivered to
"myad...@myserver.it", all other mails correcty failed.

Any idea?

Reply all
Reply to author
Forward
0 new messages