summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2005-09-19 03:23:11 +0000
committerbwarsaw2005-09-19 03:23:11 +0000
commit48ebf3bb2d9bb185696c7ab5ed1f569bba6ff40f (patch)
tree9dca4c671e5ae471f1d69a3cfb2e605190a4dee7
parent50ffcba6bbbc316af3e4640cbe030c809346e631 (diff)
downloadmailman-48ebf3bb2d9bb185696c7ab5ed1f569bba6ff40f.tar.gz
mailman-48ebf3bb2d9bb185696c7ab5ed1f569bba6ff40f.tar.zst
mailman-48ebf3bb2d9bb185696c7ab5ed1f569bba6ff40f.zip
-rw-r--r--ACKNOWLEDGMENTS1
-rw-r--r--Mailman/Handlers/Hold.py8
-rw-r--r--NEWS3
3 files changed, 10 insertions, 2 deletions
diff --git a/ACKNOWLEDGMENTS b/ACKNOWLEDGMENTS
index e184d9514..1eb879e20 100644
--- a/ACKNOWLEDGMENTS
+++ b/ACKNOWLEDGMENTS
@@ -189,6 +189,7 @@ in answering questions on mailman-users.
Guido van Rossum
Nicholas Russo
Chris Ryan
+ Mark Sapiro
Cabel Sasser
Bartosz Sawicki
Kai Schaetzl
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py
index ffc0839bc..fdfaa09d2 100644
--- a/Mailman/Handlers/Hold.py
+++ b/Mailman/Handlers/Hold.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -25,7 +25,6 @@ we do nothing. If the message must be held for approval, then the hold
database is updated and any administrator notification messages are sent.
Finally an exception is raised to let the pipeline machinery know that further
message handling should stop.
-
"""
import email
@@ -176,6 +175,11 @@ def process(mlist, msg, msgdata):
bodylen = 0
for line in email.Iterators.body_line_iterator(msg):
bodylen += len(line)
+ for part in msg.walk():
+ if part.preamble:
+ bodylen += len(part.preamble)
+ if part.epilogue:
+ bodylen += len(part.epilogue)
if bodylen/1024.0 > mlist.max_message_size:
hold_for_approval(mlist, msg, msgdata,
MessageTooBig(bodylen, mlist.max_message_size))
diff --git a/NEWS b/NEWS
index c6cde24db..ecfffcd30 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Here is a history of user visible changes to Mailman.
Bug fixes and other patches
+ - Take preambles and epilogues into account when calculating message sizes
+ for holding purposes (Mark Sapiro).
+
- Logging/Logger.py unicode transform option (1235567).
- bin/update crashes with bogus files (949117).