Public bug reported:
Hi,
We have updated our external MTA to use OpenBSD(6.4) and opensmptd.
After we updated, mailman started to send "bounce message w/no discernable addresses" messages to us (list admins). It seems that mailman is not able to parse bounce messages sent from opensmtpd.
Please check an example of a bounce message from opensmtpd:
Hi!
This is the MAILER-DAEMON, please DO NOT REPLY to this email.
An error has occurred while attempting to deliver a message for the following list of recipients:
XXXXXXXXX@live.com: 550 5.5.0 Requested action not taken: mailbox unavailable. [VE1EUR02FT047.eop-EUR02.prod.protection.outlook.com]
Below is a copy of the original message:
We are using mailman 2.1.11 and I could not test the issue on version 2.1.17. But, reading the code, it seem that the problem is still there.
We managed to fix the problem by editing the file 'mailman/Mailman/Bouncers/SimpleMatch.py' and including the following lines:
191,194d190 < # opensmtpd < (_c('An error has occurred while attempting to deliver a message for'), < _c('Below is a copy of the original message'), < _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)')),
patch follows attached
Regards,
Cristiano
** Affects: mailman Importance: Undecided Status: New
** Patch added: "SimpleMatch.py.patch" https://bugs.launchpad.net/bugs/1805137/+attachment/5216458/+files/SimpleMat...
Thank you for the report and suggested patch. If possible, please post the entire, raw bounce message including all headers. We need that for the testing data. Also, depending on the headers and MIME structure of the message, SimpleMatch may not be the optimum recognizer.
Hi Mark,
Thanks for your answer.
I'm attaching one of the messages that mailman have sent to us. But I had to anonymize some headers. Hope it is still useful for you guys.
In my last message, I said that we was using version 2.1.11. This info was wrong: we are in 2.1.17. The patch that I have sent applies to this version (not 2.1.29 nor 2.1.11).
Thanks,
** Attachment added: "original-message.eml" https://bugs.launchpad.net/mailman/+bug/1805137/+attachment/5216984/+files/o...
Thanks for the message. The anonymizing is not a problem. It turns out that this is almost an RFC 3464 compliant DSN and should be recognized by Mailman/Bouncers/DSN.py except for the fact that the 'action' in the Delivery Report is 'error'. This is non-compliant. RFC 3464, sec 2.3.3 defines action as:
action-value = "failed" / "delayed" / "delivered" / "relayed" / "expanded"
Thus, 'Action: error' in this DSN is non-compliant. It should be 'Action: failed'. You may wish to report this to the opensmtpd developers.
If the mean time, if you look at Mailman/Bouncers/DSN.py at line 59, you'll see
if not action.startswith('fail'): # Some non-permanent failure, so ignore this block continue
If you change that to
if not (action.startswith('fail') or action.startswith('error')): # Some non-permanent failure, so ignore this block continue
this DSN should be recognized by DSN.py. I'll be incorporating this fix for the next release.
** Branch linked: lp:mailman/2.1
** Changed in: mailman Importance: Undecided => Low
** Changed in: mailman Status: New => Fix Committed
** Changed in: mailman Milestone: None => 2.1.30
** Changed in: mailman Assignee: (unassigned) => Mark Sapiro (msapiro)
thanks Mark,
I will send a message to the opensmtpd guys.
** Changed in: mailman Status: Fix Committed => Fix Released