Opened 7 years ago

Last modified 7 years ago

#6726 defect new

Bounced bounce from a smart host generates an unhandled exception

Reported by: Stacey Sern Owned by:
Priority: normal Milestone:
Component: mail Keywords:
Cc: Branch:
Author:

Description (last modified by hawkowl)

When a smart host is unable to deliver a message to the destination address, it sends a bounce message to the origination address. If that bounce message also cannot be delivered, an unhandled exception is generated.

In more detail, when mail.relaymanager._AttemptManager is notified that a message cannot be delivered, it generates a bounce message to the destination address. In the envelope for the bounce message, the from address is set to an empty string. If the bounce message also cannot be delivered, another bounce message is generated but the destination address is set to the from address of the first bounced message which is an empty string. When mail.relaymanager.SmartHostSMTPManager._checkStateMX prepares to send the message, it parses the address and ends up with a NoneType object instead of a string. When it tries to call split on the address, an AttributeError occurs.

The second bounce message should not even be generated. _AttemptManager.notifyFailure contains the comment "Be careful: if it's a bounced bounce, silently discard it" but it does not appear that that is taking place.

Change History (2)

comment:1 Changed 7 years ago by Stacey Sern

The empty string did not appear properly in two places in the description above. The second paragraph should read:

In more detail, when mail.relaymanager._AttemptManager is notified that a message cannot be delivered, it generates a bounce message to the destination address. In the envelope for the bounce message, the from address is set to the empty string. If the bounce message also cannot be delivered, another bounce message is generated but the destination address is set to the from address of the first bounced message which is the empty string. When mail.relaymanager.SmartHostSMTPManager._checkStateMX prepares to send the message, it parses the address and ends up with a NoneType object instead of a string. When it tries to call split on the address, an AttributeError occurs.

comment:2 in reply to:  1 Changed 7 years ago by hawkowl

Description: modified (diff)
Note: See TracTickets for help on using tickets.