You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2020/08/30 12:34:58 UTC
[incubator-ponymail-unit-tests] branch master updated: Update
documentation to agree with code
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-unit-tests.git
The following commit(s) were added to refs/heads/master by this push:
new 8c09780 Update documentation to agree with code
8c09780 is described below
commit 8c097803eaaee6b76b04c560e9e35c2b5cc444d8
Author: Sebb <se...@apache.org>
AuthorDate: Sun Aug 30 13:34:42 2020 +0100
Update documentation to agree with code
---
tools/collate-mboxes.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/collate-mboxes.py b/tools/collate-mboxes.py
index ea8d202..5b9a39d 100755
--- a/tools/collate-mboxes.py
+++ b/tools/collate-mboxes.py
@@ -1,9 +1,11 @@
#!/usr/bin/env python3
"""
Simple tool for collating multiple mbox files into a single one, sorted by message ID.
+If the message-ID is missing, use the Date or Subject and prefix the sort key to appear last.
+
Used for multi-import tests where you wish to check that multiple sources give the same ID
-WARNING: emails without a Message-ID are currently dropped
+Emails with duplicate sort keys are logged and dropped
"""
import mailbox
import sys
@@ -21,6 +23,7 @@ for msgfile in msgfiles:
)
for key in messages.iterkeys():
message = messages.get(key)
+ print(message.get_from())
msgid = message.get('message-id')
if msgid:
sortkey = msgid.strip()