error 501, Invalid Address. Check email

Bug #527650 reported by Xaig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Singing & Dancing
New
Undecided
Unassigned

Bug Description

We had the problem that when we sent a newsletter, some users received more than once and others not receive any.
We looked at the logs, and we saw that when we sent the newsletter it gave an 501 error (Invalid address) and it stopped sending to the other users.
Then, after a few minutes it sent it again resulting in the same error, and thus into a loop until we stopped it. This happen because there was malformed addresses that the email checker of singing & dancing could not detect, as <email address hidden> (in latest versions of S&D, it is detected) or <email address hidden><email address hidden>.
I've been checking the code and I saw that S&D uses its own email checker, and not what Plone uses.
As a solution, I modified the file collective.dancing.composer.py so that S&D also checks email with the email checker of Plone.
 Before:
  if not re.match(InvalidEmailAddress.regex, value):
   raise InvalidEmailAddress

 Now:
  from Products.CMFDefault.utils import checkEmailAddress
  ...

  if not re.match(InvalidEmailAddress.regex, value):
   raise InvalidEmailAddress
  checkEmailAddress(value)

Revision history for this message
Daniel Nouri (daniel.nouri) wrote :

Can you post a full traceback of that 501 error?

Also, which version of zope.sendmail are you using?

Revision history for this message
Xaig (xavi-aigua) wrote :

The error happens because there is an invalid address (Try to send to the address '<email address hidden><email address hidden>'). When I remove this address and I send again the newsletter, the error doesn't happen.
The S&D email checker accepts address like '<email address hidden><email address hidden>'; I add the Plone email checker to prevent it.

Version of zope.sendmail: 3.5.1
Traceback:
    2010-02-24T17:35:09 ERROR Zope.SiteErrorLog http://localhost/plonesite/@@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 93, in tpc_finish
      Module collective.dancing.composer, line 428, in send
      Module zope.sendmail.mailer, line 72, in send
      Module smtplib, line 695, in sendmail
    SMTPRecipientsRefused: {<email address hidden><email address hidden>': (501, '5.5.4 Invalid Address')}

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.