Bounces sent from opensmtpd not parsed

Bug #1805137 reported by Cristiano de Paula Costa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Low
Mark Sapiro

Bug Description

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:

<email address hidden>: 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

Related branches

Revision history for this message
Cristiano de Paula Costa (cristianocosta) wrote :
Revision history for this message
Mark Sapiro (msapiro) wrote :

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.

Revision history for this message
Cristiano de Paula Costa (cristianocosta) wrote :

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,

Revision history for this message
Mark Sapiro (msapiro) wrote :

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.

Mark Sapiro (msapiro)
Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Low
milestone: none → 2.1.30
status: New → Fix Committed
Revision history for this message
Cristiano de Paula Costa (cristianocosta) wrote :

thanks Mark,

I will send a message to the opensmtpd guys.

Mark Sapiro (msapiro)
Changed in mailman:
status: Fix Committed → Fix Released
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.