send-bug-notifications.py does not handle rejections from mail server

Bug #54152 reported by James Henstridge
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

While setting up the demo.launchpad.net outgoing email, I ran into a problem exposed by the outgoing whitelist we've got running.

The whitelist currently rejects the message immediately when the script tries to send the email. The exception is not handled, and no further emails get sent.

I've opened an RT ticket to see if the whitelist behaviour can be changed to drop said emails without error, but we might want to address the problem anyway, to make sure that things get handled properly if mail ever gets rejected in production.

Tags: email lp-bugs
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 54152] send-bug-notifications.py does not handle rejections from mail server

On Wed, Jul 26, 2006 at 02:29:19PM -0000, James Henstridge wrote:
> Public bug reported:
>
> While setting up the demo.launchpad.net outgoing email, I ran into a
> problem exposed by the outgoing whitelist we've got running.
>
> The whitelist currently rejects the message immediately when the script
> tries to send the email. The exception is not handled, and no further
> emails get sent.
>
> I've opened an RT ticket to see if the whitelist behaviour can be
> changed to drop said emails without error, but we might want to address
> the problem anyway, to make sure that things get handled properly if
> mail ever gets rejected in production.

Yeah, we should handle it. Can you paste the traceback here?

Revision history for this message
James Henstridge (jamesh) wrote :

The traceback I saw was:

Traceback (most recent call last):
  File "/srv/launchpad.net/launchpad/cronscripts/send-bug-notifications.py", line 77, in ?
    sys.exit(main())
  File "/srv/launchpad.net/launchpad/cronscripts/send-bug-notifications.py", line 58, in main
    sendmail(email)
  File "/srv/launchpad.net/launchpad/lib/canonical/launchpad/mail/sendmail.py",
line 219, in sendmail
    smtp.sendmail(config.bounce_address, to_addrs, raw_message)
  File "/usr/lib/python2.4/smtplib.py", line 695, in sendmail
    raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'<email address hidden>': (421, 'Unexpected failure, please try later')}

When looking at the problem manually, the mail was being rejected with the "421 Unexpected failure" message on "RCPT TO:". It wasn't related to dilys -- that was just the first address in the recipient list.

Revision history for this message
Diogo Matsubara (matsubara) wrote : Re: [Bug 54152] Re: [Bug 54152] send-bug-notifications.py does not handle rejections from mail server

> Yeah, we should handle it. Can you paste the traceback here?

Traceback (most recent call last):
  File "/srv/launchpad.net/launchpad/cronscripts/send-bug-notifications.py", line 77, in ?
    sys.exit(main())
  File "/srv/launchpad.net/launchpad/cronscripts/send-bug-notifications.py", line 58, in main
    sendmail(email)
  File "/srv/launchpad.net/launchpad/lib/canonical/launchpad/mail/sendmail.py", line 219, in sendmail
    smtp.sendmail(config.bounce_address, to_addrs, raw_message)
  File "/usr/lib/python2.4/smtplib.py", line 695, in sendmail
    raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'<email address hidden>': (421, 'Unexpected failure, please try later')}

https://lists.ubuntu.com/mailman/private/launchpad-error-reports/Week-of-Mon-20060724/031737.html
--
Diogo M. Matsubara

Changed in malone:
status: New → Confirmed
Curtis Hovey (sinzui)
Changed in launchpad:
status: Confirmed → Triaged
importance: Undecided → Low
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.