ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: emails with no body content are ignored
Date Mon, 12 Dec 2016 00:48:44 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 629ad2fcf -> fed2cdb10


emails with no body content are ignored

This fixes #109

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/fed2cdb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/fed2cdb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/fed2cdb1

Branch: refs/heads/master
Commit: fed2cdb10df7d102af24314ba625fdd370072016
Parents: 629ad2f
Author: Sebb <sebb@apache.org>
Authored: Mon Dec 12 00:48:30 2016 +0000
Committer: Sebb <sebb@apache.org>
Committed: Mon Dec 12 00:48:30 2016 +0000

----------------------------------------------------------------------
 CHANGELOG.md                          |  1 +
 test/resources/pass/emptyattach2.mbox | 44 ++++++++++++++++++++++++++
 test/resources/pass/emptybody.mbox    | 51 ++++++++++++++++++++++++++++++
 test/resources/valid/emptybody.mbox   | 51 ------------------------------
 tools/archiver.py                     |  2 +-
 5 files changed, 97 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/fed2cdb1/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 98bc011..6c8c1db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,6 +57,7 @@
 - stats.lua can fail when creating top10 senders (#283)
 - ponymail.js/formatDate may show the wrong timezone (#285)
 - archiver.py fails when attachment name is not ASCII (#287)
+- emails with no body content are ignored (#109)
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/fed2cdb1/test/resources/pass/emptyattach2.mbox
----------------------------------------------------------------------
diff --git a/test/resources/pass/emptyattach2.mbox b/test/resources/pass/emptyattach2.mbox
new file mode 100644
index 0000000..07b490f
--- /dev/null
+++ b/test/resources/pass/emptyattach2.mbox
@@ -0,0 +1,44 @@
+From tomcat-user-return-50118-qmlist-jakarta-archive-tomcat-user=jakarta.apache.org@jakarta.apache.org
Fri Jan 24 12:24:14 2003
+Return-Path: <tomcat-user-return-50118-qmlist-jakarta-archive-tomcat-user=jakarta.apache.org@jakarta.apache.org>
+Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org
+Received: (qmail 13295 invoked from network); 24 Jan 2003 12:24:14 -0000
+Received: from exchange.sun.com (192.18.33.10)
+  by 208.185.179.12.available.above.net with SMTP; 24 Jan 2003 12:24:14 -0000
+Received: (qmail 24215 invoked by uid 97); 24 Jan 2003 12:25:16 -0000
+Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org
+Received: (qmail 24199 invoked by uid 97); 24 Jan 2003 12:25:16 -0000
+Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm
+Precedence: bulk
+List-Unsubscribe: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
+List-Subscribe: <mailto:tomcat-user-subscribe@jakarta.apache.org>
+List-Help: <mailto:tomcat-user-help@jakarta.apache.org>
+List-Post: <mailto:tomcat-user@jakarta.apache.org>
+List-Id: "Tomcat Users List" <tomcat-user.jakarta.apache.org>
+Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
+Delivered-To: mailing list tomcat-user@jakarta.apache.org
+Received: (qmail 24187 invoked by uid 98); 24 Jan 2003 12:25:15 -0000
+X-Antivirus: nagoya (v4218 created Aug 14 2002)
+Message-ID: <004201c2c3a3$82f86e40$160aa8c0@win98>
+From: "Henry" <henry@cafelab.com>
+To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
+Subject: how do I detect alive sessions at this moment?
+Date: Fri, 24 Jan 2003 20:24:15 +0800
+MIME-Version: 1.0
+Content-Type: multipart/alternative;
+	boundary="----=_NextPart_000_003F_01C2C3E6.90B6F900"
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2800.1106
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
+X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N
+X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N
+
+------=_NextPart_000_003F_01C2C3E6.90B6F900
+Content-Type: text/plain;
+	charset="big5"
+Content-Transfer-Encoding: quoted-printable
+
+
+------=_NextPart_000_003F_01C2C3E6.90B6F900--
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/fed2cdb1/test/resources/pass/emptybody.mbox
----------------------------------------------------------------------
diff --git a/test/resources/pass/emptybody.mbox b/test/resources/pass/emptybody.mbox
new file mode 100644
index 0000000..d1f849b
--- /dev/null
+++ b/test/resources/pass/emptybody.mbox
@@ -0,0 +1,51 @@
+From issues-return-129-apmail-ponymail-issues-archive=ponymail.apache.org@ponymail.incubator.apache.org
 Thu Nov 17 00:49:30 2016
+Return-Path: <issues-return-129-apmail-ponymail-issues-archive=ponymail.apache.org@ponymail.incubator.apache.org>
+X-Original-To: apmail-ponymail-issues-archive@minotaur.apache.org
+Delivered-To: apmail-ponymail-issues-archive@minotaur.apache.org
+Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
+	by minotaur.apache.org (Postfix) with SMTP id A72D919611
+	for <apmail-ponymail-issues-archive@minotaur.apache.org>; Thu, 17 Nov 2016 00:49:30
+0000 (UTC)
+Received: (qmail 22868 invoked by uid 500); 17 Nov 2016 00:49:30 -0000
+Delivered-To: apmail-ponymail-issues-archive@ponymail.apache.org
+Received: (qmail 22841 invoked by uid 500); 17 Nov 2016 00:49:30 -0000
+Mailing-List: contact issues-help@ponymail.incubator.apache.org; run by ezmlm
+Precedence: bulk
+List-Help: <mailto:issues-help@ponymail.incubator.apache.org>
+List-Unsubscribe: <mailto:issues-unsubscribe@ponymail.incubator.apache.org>
+List-Post: <mailto:issues@ponymail.incubator.apache.org>
+List-Id: <issues.ponymail.incubator.apache.org>
+Reply-To: dev@ponymail.incubator.apache.org
+Delivered-To: mailing list issues@ponymail.incubator.apache.org
+Received: (qmail 22832 invoked by uid 99); 17 Nov 2016 00:49:30 -0000
+Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142)
+    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 00:49:30 +0000
+Received: from localhost (localhost [127.0.0.1])
+	by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id
2614B1A00A2
+	for <issues@ponymail.apache.org>; Thu, 17 Nov 2016 00:49:30 +0000 (UTC)
+X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org
+X-Spam-Flag: NO
+X-Spam-Score: -7.019
+X-Spam-Level:
+X-Spam-Status: No, score=-7.019 tagged_above=-999 required=6.31
+	tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5,
+	RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
+	RP_MATCHES_RCVD=-2.999] autolearn=disabled
+Received: from mx1-lw-eu.apache.org ([10.40.0.8])
+	by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024)
+	with ESMTP id XffM2rPGCqQk for <issues@ponymail.apache.org>;
+	Thu, 17 Nov 2016 00:49:29 +0000 (UTC)
+Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
+	by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id DD1285FCC9
+	for <issues@ponymail.incubator.apache.org>; Thu, 17 Nov 2016 00:49:28 +0000 (UTC)
+Received: (qmail 22820 invoked by uid 99); 17 Nov 2016 00:49:28 -0000
+Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9)
+    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 00:49:28 +0000
+Received: by minotaur.apache.org (Postfix, from userid 1721)
+	id D69A719610; Thu, 17 Nov 2016 00:49:27 +0000 (UTC)
+To: issues@ponymail.incubator.apache.org
+Subject: Test email with empty body
+Message-Id: <20161117004927.D69A719610@minotaur.apache.org>
+Date: Thu, 17 Nov 2016 00:49:27 +0000 (UTC)
+From: sebb@apache.org (Sebastian Bazley)
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/fed2cdb1/test/resources/valid/emptybody.mbox
----------------------------------------------------------------------
diff --git a/test/resources/valid/emptybody.mbox b/test/resources/valid/emptybody.mbox
deleted file mode 100644
index d1f849b..0000000
--- a/test/resources/valid/emptybody.mbox
+++ /dev/null
@@ -1,51 +0,0 @@
-From issues-return-129-apmail-ponymail-issues-archive=ponymail.apache.org@ponymail.incubator.apache.org
 Thu Nov 17 00:49:30 2016
-Return-Path: <issues-return-129-apmail-ponymail-issues-archive=ponymail.apache.org@ponymail.incubator.apache.org>
-X-Original-To: apmail-ponymail-issues-archive@minotaur.apache.org
-Delivered-To: apmail-ponymail-issues-archive@minotaur.apache.org
-Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
-	by minotaur.apache.org (Postfix) with SMTP id A72D919611
-	for <apmail-ponymail-issues-archive@minotaur.apache.org>; Thu, 17 Nov 2016 00:49:30
+0000 (UTC)
-Received: (qmail 22868 invoked by uid 500); 17 Nov 2016 00:49:30 -0000
-Delivered-To: apmail-ponymail-issues-archive@ponymail.apache.org
-Received: (qmail 22841 invoked by uid 500); 17 Nov 2016 00:49:30 -0000
-Mailing-List: contact issues-help@ponymail.incubator.apache.org; run by ezmlm
-Precedence: bulk
-List-Help: <mailto:issues-help@ponymail.incubator.apache.org>
-List-Unsubscribe: <mailto:issues-unsubscribe@ponymail.incubator.apache.org>
-List-Post: <mailto:issues@ponymail.incubator.apache.org>
-List-Id: <issues.ponymail.incubator.apache.org>
-Reply-To: dev@ponymail.incubator.apache.org
-Delivered-To: mailing list issues@ponymail.incubator.apache.org
-Received: (qmail 22832 invoked by uid 99); 17 Nov 2016 00:49:30 -0000
-Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142)
-    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 00:49:30 +0000
-Received: from localhost (localhost [127.0.0.1])
-	by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id
2614B1A00A2
-	for <issues@ponymail.apache.org>; Thu, 17 Nov 2016 00:49:30 +0000 (UTC)
-X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org
-X-Spam-Flag: NO
-X-Spam-Score: -7.019
-X-Spam-Level:
-X-Spam-Status: No, score=-7.019 tagged_above=-999 required=6.31
-	tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5,
-	RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
-	RP_MATCHES_RCVD=-2.999] autolearn=disabled
-Received: from mx1-lw-eu.apache.org ([10.40.0.8])
-	by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024)
-	with ESMTP id XffM2rPGCqQk for <issues@ponymail.apache.org>;
-	Thu, 17 Nov 2016 00:49:29 +0000 (UTC)
-Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
-	by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id DD1285FCC9
-	for <issues@ponymail.incubator.apache.org>; Thu, 17 Nov 2016 00:49:28 +0000 (UTC)
-Received: (qmail 22820 invoked by uid 99); 17 Nov 2016 00:49:28 -0000
-Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9)
-    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 00:49:28 +0000
-Received: by minotaur.apache.org (Postfix, from userid 1721)
-	id D69A719610; Thu, 17 Nov 2016 00:49:27 +0000 (UTC)
-To: issues@ponymail.incubator.apache.org
-Subject: Test email with empty body
-Message-Id: <20161117004927.D69A719610@minotaur.apache.org>
-Date: Thu, 17 Nov 2016 00:49:27 +0000 (UTC)
-From: sebb@apache.org (Sebastian Bazley)
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/fed2cdb1/tools/archiver.py
----------------------------------------------------------------------
diff --git a/tools/archiver.py b/tools/archiver.py
index 0e2b810..e71d7a6 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -296,7 +296,7 @@ class Archiver(object):
 
         attachments, contents = self.msgfiles(msg)
         irt = ""
-        if body or attachments:
+        if body is not None or attachments:
             pmid = mid
             try:
                 # Use full message as bytes for mid?


Mime
View raw message