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.
** Changed in: singing-dancing
Assignee: (unassigned) => Daniel Nouri (daniel.nouri)
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')}
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
http://pypi.python.org/pypi/collective.dancing#configuring-zope-
sendmail-to-send-out-messages
Patches happily accepted.
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?