unparseable message

I built an Ubuntu package for the patched Mailman 2.1.9, and when I tried to install it this morning, there was an error message stating that
The directory /var/lib/mailman/qfiles contains files.
It needs to be empty for the upgrade work properly.
I looked at that directory, and I found a number of
bounces/xxxxx.bak
files. Per a reply posting on 12 Feb-2008 by Mark Sapiro (Subject: [Mailman-Users] bounce file questions) I moved those files elsewhere (for further study). Then I was able to install the updated Mailman 2.1.9 package. Mark wrote:
Yes, it's safe to delete. It is the backup of the file that
BounceRunner was processing when something happened, and
BounceRunner never 'finished' processing the file. There
was a hole that allowed this to occur on an 'unparseable'
(almost always spam) message in 2.1.9, no whenever you get
the "Ignoring unparseable message" in the error log, the
.bak file is left behind. This is fixed in 2.1.10n now in
beta.
I looked at the logs and found an unparseable rejection message. I am including it below. I am not sure what the problem is, but I believe that the
content-type: message/rfc822
attachment contains the beginning of the original MIME-encoded posting, and Mailman is getting confused with this MIME-within-MIME. Here is a message from the Mailman error log:
Uncaught runner exception: No terminating boundary and no trailing
empty line
Here is the traceback:
Traceback (most recent call last): File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 100, in _oneloop msg, msgdata = self._switchboard.dequeue(filebase) File "/var/lib/mailman/Mailman/Queue/Switchboard.py", line 164, in dequeue msg = email.message_from_string(msg, Message.Message) File "/var/lib/mailman/pythonlib/email/__init__.py", line 51, in message_from_string return Parser(_class, strict=strict).parsestr(s) File "/var/lib/mailman/pythonlib/email/Parser.py", line 75, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "/var/lib/mailman/pythonlib/email/Parser.py", line 64, in parse self._parsebody(root, fp, firstbodyline) File "/var/lib/mailman/pythonlib/email/Parser.py", line 240, in _parsebody msgobj = self.parsestr(part) File "/var/lib/mailman/pythonlib/email/Parser.py", line 75, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "/var/lib/mailman/pythonlib/email/Parser.py", line 64, in parse self._parsebody(root, fp, firstbodyline) File "/var/lib/mailman/pythonlib/email/Parser.py", line 265, in _parsebody msg = self.parse(fp) File "/var/lib/mailman/pythonlib/email/Parser.py", line 64, in parse self._parsebody(root, fp, firstbodyline) File "/var/lib/mailman/pythonlib/email/Parser.py", line 206, in _parsebody raise Errors.BoundaryError( BoundaryError: No terminating boundary and no trailing empty line
Am I correct in my diagnosis? And is this (i.e., the unparseability) something that can be corrected? Thanks.
Barry S. Finkel Computing and Information Systems Division Argonne National Laboratory Phone: +1 (630) 252-7277 9700 South Cass Avenue Facsimile:+1 (630) 252-4601 Building 222, Room D209 Internet: BSFinkel@anl.gov Argonne, IL 60439-4828 IBMMAIL: I1004994
----- Here is the unparseable rejection message. -----
From MAILER-DAEMON Mon Apr 21 07:03:34 2008 Return-Path: <> Received: from mailrelay.anl.gov (localhost [127.0.0.1]) by localhost.ctd.anl.gov (Postfix) with ESMTP id 8BE2E5F0C03; Mon, 21 Apr 2008 07:03:34 -0500 (CDT) Received: from mailgateway.anl.gov (mailgateway.anl.gov [130.202.101.28]) by mailrelay2.anl.gov (Postfix) with ESMTP id 601025F0C02 for <LISTNAME-bounces@lists.anl.gov>; Mon, 21 Apr 2008 07:03:34 -0500 (CDT) Received: from localhost by mailgateway.anl.gov; 21 Apr 2008 07:03:34 -0500 Date: 21 Apr 2008 07:03:34 -0500 To: LISTNAME-bounces@lists.anl.gov From: "Mail Delivery System" <MAILER-DAEMON@mailgateway.anl.gov> Subject: Delivery Status Notification (Failure) MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="orAt.4Is3ZceEe.1I4wvb.Aylgfr0" Message-Id: <20080421120334.601025F0C02@mailrelay.anl.gov>
--orAt.4Is3ZceEe.1I4wvb.Aylgfr0 content-type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable
The following message to <abcdefgh@anl.gov> was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'5.1.1 <abcdefgh@anl.gov>: Recipient a= ddress rejected: User unknown in relay recipient table' --orAt.4Is3ZceEe.1I4wvb.Aylgfr0 content-type: message/delivery-status
Reporting-MTA: dns; mailgateway.anl.gov
Final-Recipient: rfc822;abcdefgh@anl.gov Action: failed Status: 5.0.0 (permanent failure) Remote-MTA: dns; [130.202.101.23] Diagnostic-Code: smtp; 5.1.0 - Unknown address error 550-'5.1.1 <abcdefgh@anl.gov>: Recipient address rejected: User unknown in relay recipient table' (delivery attempts: 0)
--orAt.4Is3ZceEe.1I4wvb.Aylgfr0 content-type: message/rfc822
Received: from cliff.mcs.anl.gov (HELO mcs.anl.gov) ([140.221.9.17]) by mailgateway.anl.gov with ESMTP; 21 Apr 2008 07:03:34 -0500 Received: from cliff.mcs.anl.gov (HELO mcs.anl.gov) ([140.221.9.17]) by mailgateway.anl.gov with ESMTP; 21 Apr 2008 07:03:34 -0500 Received: from mailgw.mcs.anl.gov (mailgw.mcs.anl.gov [140.221.9.4]) by mcs.anl.gov (8.11.6/8.9.3) with ESMTP id m3LC1HQ149680; Mon, 21 Apr 2008 07:01:17 -0500 Received: from localhost (localhost [127.0.0.1]) by mailgw.mcs.anl.gov (Postfix) with ESMTP id 28A6434800C; Mon, 21 Apr 2008 07:01:17 -0500 (CDT) Received: from mailhost.anl.gov (mailhost.anl.gov [130.202.113.50]) by mailgw.mcs.anl.gov (Postfix) with ESMTP id 7C8CA348009; Mon, 21 Apr 2008 07:01:16 -0500 (CDT) Received: from mailhost.anl.gov (localhost [127.0.0.1]) by localhost.ctd.anl.gov (Postfix) with ESMTP id 1F6518A; Mon, 21 Apr 2008 07:00:54 -0500 (CDT) Received: from lists.anl.gov (katydid.it.anl.gov [146.137.96.32]) by mailhost.anl.gov (Postfix) with ESMTP id 2987EA3; Mon, 21 Apr 2008 07:00:40 -0500 (CDT) Received: from katydid.it.anl.gov (localhost [127.0.0.1]) by lists.anl.gov (Postfix) with ESMTP id A51C180D88; Mon, 21 Apr 2008 07:00:33 -0500 (CDT) X-Original-To: LISTNAME@lists.anl.gov Delivered-To: LISTNAME@lists.anl.gov Received: from SCOOBY.anl.gov (velma.anl.gov [146.137.8.21]) by lists.anl.gov (Postfix) with ESMTP id D35AF80D70 for <LISTNAME@lists.anl.gov>; Mon, 21 Apr 2008 07:00:29 -0500 (CDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/related; type="multipart/alternative"; boundary="----_=_NextPart_001_01C8A3A7.4B24E858" Subject: Today - Monday, April 21 Date: Mon, 21 Apr 2008 07:00:29 -0500 Message-ID: <A685CE80C33C75408D34E0883DEA6F800134184B@SCOOBY.anl.gov> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Argonne Today - Monday, April 21 Thread-Index: Acihm/Er7Ksidh3fQHeKTEnEZRl9Yg== From: "Newsroom" <xxxxxxxxxxx@anl.gov> To: <LISTNAME@lists.anl.gov> X-BeenThere: LISTNAME@lists.anl.gov X-Mailman-Version: 2.1.9 Precedence: list List-Id: "This is the LISTNAME" <LISTNAME.lists.anl.gov> List-Unsubscribe: <https://lists.anl.gov/mailman/listinfo/LISTNAME>, <mailto:LISTNAME-request@lists.anl.gov?subject=unsubscribe> List-Archive: <https://lists.anl.gov/mailman/private/LISTNAME> List-Post: <mailto:LISTNAME@lists.anl.gov> List-Help: <mailto:LISTNAME-request@lists.anl.gov?subject=help> List-Subscribe: <https://lists.anl.gov/mailman/listinfo/LISTNAME> <mailto:LISTNAME-request@lists.anl.gov?subject=subscribe> Sender: LISTNAME-bounces@lists.anl.gov Errors-To: LISTNAME-bounces@lists.anl.gov X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailgw.mcs.anl.gov
------_=_NextPart_001_01C8A3A7.4B24E858-- --orAt.4Is3ZceEe.1I4wvb.Aylgfr0--

Barry Finkel wrote:
The directory /var/lib/mailman/qfiles contains files. It needs to be empty for the upgrade work properly.
I looked at that directory, and I found a number of
bounces/xxxxx.bak
<snip>
I looked at the logs and found an unparseable rejection message. I am including it below. I am not sure what the problem is, but I believe that the
content-type: message/rfc822
attachment contains the beginning of the original MIME-encoded posting, and Mailman is getting confused with this MIME-within-MIME. Here is a message from the Mailman error log:
Uncaught runner exception: No terminating boundary and no trailing empty line
<snip>
------_=_NextPart_001_01C8A3A7.4B24E858-- --orAt.4Is3ZceEe.1I4wvb.Aylgfr0--
Mailman (actually the Python email package) doesn,t like the fact that there is no intervening empty line between the terminating boundary of the message/rfc822 part and the terminating boundary of the outer message.
Quoting from section 5.1.1 of RFC 2045
The boundary may be followed by zero or more characters of linear whitespace. It is then terminated by either another CRLF and the header fields for the next part, or by two CRLFs, in which case there are no header fields for the next part.
The real issue here is that the bounce message was attempted to be processed and logged as unparseable when it was received on 21 April, but due to an error in 2.1.9, the .bak file for the unparseable message wasn't removed.
The current Python email package is more forgiving and in fact does parse this message, but because of incompatibilities with older Python versions which are still supported by Mailman, we ship our Mailman package with an older email package.
The sending MTA has sent a DSN which is not RFC 2045 compliant in that the terminating boundary of the embedded message/rfc822 part is not followed by two CRLFs. We should be more forgiving, and the current email package is, but the initial fault is with the MTA that created a non-compliant message.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
b19141@anl.gov
-
Mark Sapiro