Barry Warsaw pushed to branch master at mailman / Mailman
Commits:
20bda700 by Aurélien Bompard at 2016-10-31T17:52:37-04:00
Remove digest mbox after sending it
Fixes #259
- - - - -
added367 by Aurélien Bompard at 2016-10-31T17:52:37-04:00
Implment review suggestions
- - - - -
366dc651 by Barry Warsaw at 2016-10-31T18:32:57-04:00
Closes: #259
Remove the digest mbox files after the digests are sent. Given by
Aurélien Bompard.
- - - - -
3 changed files:
- src/mailman/docs/NEWS.rst
- src/mailman/runners/digest.py
- src/mailman/runners/tests/test_digest.py
Changes:
=====================================
src/mailman/docs/NEWS.rst
=====================================
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -95,6 +95,8 @@ Bugs
edit to work. (Closes: #290)
* Prevent posting from banned addresses. Given by Aurélien Bompard.
(Closes: #283)
+ * Remove the digest mbox files after the digests are sent. Given by Aurélien
+ Bompard. (Closes: #259)
Configuration
-------------
=====================================
src/mailman/runners/digest.py
=====================================
--- a/src/mailman/runners/digest.py
+++ b/src/mailman/runners/digest.py
@@ -17,6 +17,7 @@
"""Digest runner."""
+import os
import re
import logging
@@ -369,3 +370,5 @@ class DigestRunner(Runner):
recipients=rfc1153_recipients,
listid=mlist.list_id,
isdigest=True)
+ # Remove the digest mbox. (GL #259)
+ os.remove(msgdata['digest_path'])
=====================================
src/mailman/runners/tests/test_digest.py
=====================================
--- a/src/mailman/runners/tests/test_digest.py
+++ b/src/mailman/runners/tests/test_digest.py
@@ -75,6 +75,9 @@ class TestDigest(unittest.TestCase):
bart.preferences.delivery_mode = DeliveryMode.plaintext_digests
make_digest_messages(self._mlist)
self._check_virgin_queue()
+ # The digest mbox and all intermediary mboxes must have been removed
+ # (GL #259).
+ self.assertEqual(os.listdir(self._mlist.data_path), [])
def test_non_ascii_message(self):
# Subscribe some users receiving digests.
View it on GitLab:
https://gitlab.com/mailman/mailman/compare/76d8d7d71b6573b9d36c4a280fb50f61f92764e0...366dc6517716b7c77c4b7a76559b1b6b5996fc8e
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org