From 1ef6975c250135fce771bd1217f12dca48959da3 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 11 Feb 2014 00:18:11 +0400 Subject: [PATCH] Refactor decode_file Optimize recursive decoding; decode message/rfc822 subparts. --- ANNOUNCE | 6 ++ mimedecode.py | 23 ++---- test/expected/msg_02.txt | 20 +++-- test/expected/msg_05.txt | 4 - test/expected/msg_06.txt | 4 - test/expected/msg_11.txt | 4 - test/expected/msg_16.txt | 12 +-- test/expected/msg_28.txt | 8 -- test/expected/msg_30.txt | 8 +- test/expected/msg_36.txt | 21 ++---- test/expected/msg_39.txt | 1 - test/expected/msg_42.txt | 4 - test/expected/msg_43.txt | 154 +++++++-------------------------------- test/expected/msg_46.txt | 4 - 14 files changed, 69 insertions(+), 204 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 917afef..b2688fa 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -22,6 +22,12 @@ RFC822 message it is decoded as one part. If it is a MIME message with multiple parts ("attachments") all parts are decoded. Decoding can be controlled by command-line options. +WHAT'S NEW in version 2.3.4 (2014-02-??) + + Optimize recursive decoding. + + Fix a bug - decode message/rfc822 subparts. + WHAT'S NEW in version 2.3.3 (2014-02-02) Forbid filtering from console. When the program runs with stdin connected to the console it shows usage help. diff --git a/mimedecode.py b/mimedecode.py index 6c29a96..884f358 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -6,11 +6,6 @@ from mimedecode_version import __version__, __author__, __copyright__, __license import sys, os import email -try: - from cStringIO import StringIO -except ImportError: - from StringIO import StringIO - me = os.path.basename(sys.argv[0]) @@ -236,10 +231,8 @@ def decode_part(msg): totext(msg, outstring) -def decode_file(infile): - "Decode the entire message" - - msg = email.message_from_file(infile) +def decode_message(msg): + "Decode message" if msg.is_multipart(): decode_headers(msg) @@ -251,16 +244,16 @@ def decode_file(infile): boundary = msg.get_boundary() for subpart in msg.get_payload(): - output("\n--%s\n" % boundary) + if boundary: + output("\n--%s\n" % boundary) if subpart.is_multipart(): # Recursively decode all parts of the subpart - newfile = StringIO(subpart.as_string()) - newfile.seek(0) - decode_file(newfile) + decode_message(subpart) else: decode_part(subpart) - output("\n--%s--\n" % boundary) + if boundary: + output("\n--%s--\n" % boundary) if msg.epilogue: output(msg.epilogue) @@ -392,7 +385,7 @@ if __name__ == "__main__": output = outfile.write try: - decode_file(infile) + decode_message(email.message_from_file(infile)) finally: infile.close() outfile.close() diff --git a/test/expected/msg_02.txt b/test/expected/msg_02.txt index 4625d00..fa2fcee 100644 --- a/test/expected/msg_02.txt +++ b/test/expected/msg_02.txt @@ -52,13 +52,15 @@ Content-Type: multipart/digest; boundary="__--__--" --__--__-- Message: 1 -Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 20 Apr 2001 20:16:13 -0400 To: ppp@zzz.org From: barry@digicool.com (Barry A. Warsaw) Subject: [Ppp] testing #1 Precedence: bulk +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py hello @@ -68,11 +70,13 @@ hello Message: 2 Date: Fri, 20 Apr 2001 20:16:21 -0400 -Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: ppp@zzz.org From: barry@digicool.com (Barry A. Warsaw) Precedence: bulk +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py hello @@ -82,12 +86,14 @@ hello Message: 3 Date: Fri, 20 Apr 2001 20:16:25 -0400 -Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: ppp@zzz.org From: barry@digicool.com (Barry A. Warsaw) Subject: [Ppp] testing #3 Precedence: bulk +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py hello @@ -97,12 +103,14 @@ hello Message: 4 Date: Fri, 20 Apr 2001 20:16:28 -0400 -Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: ppp@zzz.org From: barry@digicool.com (Barry A. Warsaw) Subject: [Ppp] testing #4 Precedence: bulk +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py hello @@ -112,12 +120,14 @@ hello Message: 5 Date: Fri, 20 Apr 2001 20:16:32 -0400 -Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: ppp@zzz.org From: barry@digicool.com (Barry A. Warsaw) Subject: [Ppp] testing #5 Precedence: bulk +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py hello diff --git a/test/expected/msg_05.txt b/test/expected/msg_05.txt index 22f0fb4..0272105 100644 --- a/test/expected/msg_05.txt +++ b/test/expected/msg_05.txt @@ -21,13 +21,9 @@ Yadda yadda yadda --D1690A7AC1.996856090/mail.example.com Content-Type: message/rfc822 - ---None From: nobody@python.org Yadda yadda yadda ---None-- - --D1690A7AC1.996856090/mail.example.com-- diff --git a/test/expected/msg_06.txt b/test/expected/msg_06.txt index e0d274a..67a0c07 100644 --- a/test/expected/msg_06.txt +++ b/test/expected/msg_06.txt @@ -16,8 +16,6 @@ X-Attribution: BAW X-Oblique-Strategy: Be dirty X-Url: http://barry.wooz.org - ---None Return-Path: Delivered-To: barry@python.org Message-ID: <15265.9468.713530.98441@python.org> @@ -35,5 +33,3 @@ Content-Type: text/plain; charset="utf-8" X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py - ---None-- diff --git a/test/expected/msg_11.txt b/test/expected/msg_11.txt index b4b46ae..bd135f7 100644 --- a/test/expected/msg_11.txt +++ b/test/expected/msg_11.txt @@ -3,10 +3,6 @@ Content-Type: message/rfc822 MIME-Version: 1.0 Subject: The enclosing message - ---None Subject: An enclosed message Here is the body of the message. - ---None-- diff --git a/test/expected/msg_16.txt b/test/expected/msg_16.txt index 3ab9629..e533601 100644 --- a/test/expected/msg_16.txt +++ b/test/expected/msg_16.txt @@ -55,33 +55,25 @@ Your message cannot be delivered to the following recipients: --Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA) Content-type: message/DELIVERY-STATUS - ---None Original-envelope-id: 0GK500B4HD0888@cougar.noc.ucla.edu Reporting-MTA: dns; cougar.noc.ucla.edu - ---None Action: failed Status: 5.0.0 (recipient reached disk quota) Original-recipient: rfc822;jangel1@cougar.noc.ucla.edu Final-recipient: rfc822;jangel1@cougar.noc.ucla.edu ---None-- - --Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA) Content-type: MESSAGE/RFC822 - ---None Return-path: scr-admin@socal-raves.org Received: from sims-ms-daemon by cougar.noc.ucla.edu (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) id <0GK500B01D0B8X@cougar.noc.ucla.edu>; Sun, 23 Sep 2001 20:14:35 -0700 (PDT) Received: from panther.noc.ucla.edu by cougar.noc.ucla.edu (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) - with ESMTP id <0GK500B4GD0888@cougar.noc.ucla.edu> for jangel1@sims-ms-daemon; + with ESMTP id <0GK500B4GD0888@cougar.noc.ucla.edu> for jangel1@sims-ms-daemon; Sun, 23 Sep 2001 20:14:33 -0700 (PDT) Received: from babylon.socal-raves.org (ip-209-85-222-117.dreamhost.com [209.85.222.117]) @@ -132,7 +124,5 @@ For event info, list questions, or to unsubscribe, see http://www.socal-raves.or ---None-- - --Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA)-- diff --git a/test/expected/msg_28.txt b/test/expected/msg_28.txt index 1c0d0c2..bf3272b 100644 --- a/test/expected/msg_28.txt +++ b/test/expected/msg_28.txt @@ -7,8 +7,6 @@ Content-Type: multipart/digest; boundary=BOUNDARY --BOUNDARY Content-Type: message/rfc822 - ---None To: aa@bb.org From: cc@dd.org Subject: ee @@ -18,13 +16,9 @@ X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py message 1 ---None-- - --BOUNDARY Content-Type: message/rfc822 - ---None To: aa@bb.org From: cc@dd.org Subject: ee @@ -34,6 +28,4 @@ X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py message 2 ---None-- - --BOUNDARY-- diff --git a/test/expected/msg_30.txt b/test/expected/msg_30.txt index 585a014..deae715 100644 --- a/test/expected/msg_30.txt +++ b/test/expected/msg_30.txt @@ -6,19 +6,23 @@ Content-Type: multipart/digest; boundary=BOUNDARY --BOUNDARY -Content-Type: text/plain; charset=us-ascii To: aa@bb.org From: cc@dd.org Subject: ee +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py message 1 --BOUNDARY -Content-Type: text/plain; charset=us-ascii To: aa@bb.org From: cc@dd.org Subject: ee +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py message 2 diff --git a/test/expected/msg_36.txt b/test/expected/msg_36.txt index d889402..7ee1898 100644 --- a/test/expected/msg_36.txt +++ b/test/expected/msg_36.txt @@ -16,32 +16,27 @@ Content-Type: Multipart/Alternative; Boundary="OtherAccess" --OtherAccess -Content-Type: Message/External-body; access-type="mail-server"; - server="mailserv@ietf.org" +Content-Type: Message/External-body; + access-type="mail-server"; + server="mailserv@ietf.org" - ---None Content-Type: text/plain Content-ID: <19981222151406.I-D@ietf.org> ENCODING mime FILE /internet-drafts/draft-ietf-mboned-mix-00.txt ---None-- - --OtherAccess -Content-Type: Message/External-body; name="draft-ietf-mboned-mix-00.txt"; - site="ftp.ietf.org"; access-type="anon-ftp"; - directory="internet-drafts" +Content-Type: Message/External-body; + name="draft-ietf-mboned-mix-00.txt"; + site="ftp.ietf.org"; + access-type="anon-ftp"; + directory="internet-drafts" - ---None Content-Type: text/plain Content-ID: <19981222151406.I-D@ietf.org> ---None-- - --OtherAccess-- --NextPart-- diff --git a/test/expected/msg_39.txt b/test/expected/msg_39.txt index 1b51b88..26b1689 100644 --- a/test/expected/msg_39.txt +++ b/test/expected/msg_39.txt @@ -13,7 +13,6 @@ Content-Type: multipart/alternative; boundary="----- =_aaaaaaaaaa1" Content-ID: <20592.1022586929.2@example.com> - ------- =_aaaaaaaaaa1 Content-Type: application/octet-stream Content-ID: <20592.1022586929.3@example.com> diff --git a/test/expected/msg_42.txt b/test/expected/msg_42.txt index 4363537..8b0c629 100644 --- a/test/expected/msg_42.txt +++ b/test/expected/msg_42.txt @@ -12,13 +12,9 @@ Stuff --AAA Content-Type: message/rfc822 - ---None From: webmaster@python.org To: zzz@example.com Content-Type: multipart/mixed; boundary="BBB" ---None-- - --AAA-- diff --git a/test/expected/msg_43.txt b/test/expected/msg_43.txt index 812dd14..33aaca1 100644 --- a/test/expected/msg_43.txt +++ b/test/expected/msg_43.txt @@ -38,265 +38,161 @@ Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Description: Delivery error report - ---None Reporting-MTA: dns; sacspam01.dot.ca.gov Received-From-MTA: smtp; sacspam01.dot.ca.gov ([127.0.0.1]) Arrival-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) - ---None Final-Recipient: rfc822; xxxxxxx@dot.ca.gov Action: failed Status: 5.7.1 -Diagnostic-Code: smtp; - 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: - auto__mail.python.bat +Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, id=01956-02-2 - BANNED: auto__mail.python.bat Last-Attempt-Date: Fri, 26 Nov 2004 19:41:44 -0800 (PST) ---None-- - ------------=_1101526904-1956-5 Content-Type: text/rfc822-headers Content-Disposition: inline diff --git a/test/expected/msg_46.txt b/test/expected/msg_46.txt index f9135b5..0260b99 100644 --- a/test/expected/msg_46.txt +++ b/test/expected/msg_46.txt @@ -11,8 +11,6 @@ Subject: GroupwiseForwardingTest Mime-Version: 1.0 Content-Type: message/rfc822 - ---None Return-path: Message-ID: <4B66B890.4070408@teconcept.de> Date: Mon, 01 Feb 2010 12:18:40 +0100 @@ -25,5 +23,3 @@ Content-Type: text/plain; charset="utf-8" X-MIME-Autoconverted: from iso-8859-15 to utf-8 by test id mimedecode.py Testing email forwarding with Groupwise 1.2.2010 - ---None-- -- 2.39.5