diff options
| -rw-r--r-- | Mailman/Handlers/CookHeaders.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index e51a82dde..4b13cd69e 100644 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -17,11 +17,12 @@ """Cook a message's Subject header. """ -import string import re import urlparse from Mailman import mm_cfg +CONTINUATION = ',\n\t' + def process(mlist, msg, msgdata): @@ -58,7 +59,7 @@ def process(mlist, msg, msgdata): msg['Errors-To'] = msgdata.get('errorsto', adminaddr) # # Mark message so we know we've been here - msg.headers.append('X-BeenThere: %s\n' % mlist.GetListEmail()) + msg['X-BeenThere'] = mlist.GetListEmail() # # Add Precedence: and other useful headers. None of these are standard # and finding information on some of them are fairly difficult. Some are @@ -125,7 +126,7 @@ def process(mlist, msg, msgdata): # shouldn't be hardcoded. The adding of 2 is for the colon-space # separator. if len(h) + 2 + len(v) > 78: - v = string.join(string.split(v, ', '), ',\n\t') + v = CONTINUATION.join(v.split(', ')) msg[h] = v # # Always delete List-Archive header, but only add it back if the list is |
