summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 9dfd6bbdd..77113491b 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -5,7 +5,7 @@ message and address munging, a handy-dandy routine to map a function on all
the maillists, the Logging routines, and whatever else doesn't belong
elsewhere."""
-__version__ = "$Revision: 431 $"
+__version__ = "$Revision: 437 $"
import sys, string, fcntl, os, random, regsub, re
@@ -82,6 +82,8 @@ def DeliverToUser(msg, recipient, add_headers=[]):
if not msg.getheader('to'):
msg.headers.append('To: %s\n' % recipient)
for i in add_headers:
+ if i and i[-1] != '\n':
+ i = i + '\n'
msg.headers.append(i)
file.write(string.join(msg.headers, '')+ '\n')
file.write(QuotePeriods(msg.body))