diff options
| -rw-r--r-- | Mailman/Utils.py | 4 | ||||
| -rw-r--r-- | modules/mm_utils.py | 4 |
2 files changed, 6 insertions, 2 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)) diff --git a/modules/mm_utils.py b/modules/mm_utils.py index 9dfd6bbdd..77113491b 100644 --- a/modules/mm_utils.py +++ b/modules/mm_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)) |
