[Bug 1859011] Re: bounce mail processed multiple times -> oom crash of BounceRunner

Mark Sapiro mark at msapiro.net
Thu Jan 16 12:37:20 EST 2020


I know what's going on. The bounce message itself is unusual. It
consists of a simple text/plain body containing the text

----------------------------------------------------------------------------

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients.

One or more of the recipients are not a valid user of the system. Please
check to be sure the email address is correct.

----------------------------------------------------------------------------

followed by a message/rfc822 part containing the entire original
message.

Bounce processing has a number of recognizers that examine the message
and if they recognize it, return a list of the bouncing addresses. One
of these recognizers matches RFC compliant DSNs, but there are many non-
compliant DSNs that we have seen that we try to recognize. Another
'heuristic' recognizer is SimpleMatch. It looks at every line of the
message until it finds a line matching a start pattern. Tnen it
continues to look for lines matching an address pattern until it finds a
line matching a stop pattern.

In this case, the start pattern that matches is

'A message that you( have)? sent could not be delivered'

It then looks for addresses matching

'<(?P<addr>[^>]*)>'

until it finds a line matching

'---'

It never finds the stop pattern so it goes through the entire base64
decoded PDF line by line looking for any string between '<' and '>', and
it finds a bunch of them, each of which is returned as a bouncing
address even though they don't look at all like addresses, and in fact,
the actual bouncing address is nowhere at all in the bounce message.
Then each 'address' is recorded as a bounce in the bounce_events file.

I will change the address patterns so the string inside the angle
brackets has to at least resemble an email address. That should fix
this.

** Changed in: mailman
       Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1859011

Title:
  bounce mail processed multiple times -> oom crash of BounceRunner

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1859011/+subscriptions


More information about the Mailman-coders mailing list