diff options
| author | bwarsaw | 2000-10-06 21:06:28 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-10-06 21:06:28 +0000 |
| commit | 23dd1bf8323d496cb7359a07b41e9628a8c410f2 (patch) | |
| tree | cf80913b6d836dbb29e62fb1856b702c950bb10e | |
| parent | 266b1d276994ae3738d31048e98b70cc291a0e7e (diff) | |
| download | mailman-23dd1bf8323d496cb7359a07b41e9628a8c410f2.tar.gz mailman-23dd1bf8323d496cb7359a07b41e9628a8c410f2.tar.zst mailman-23dd1bf8323d496cb7359a07b41e9628a8c410f2.zip | |
| -rw-r--r-- | Mailman/Handlers/CookHeaders.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index 9afda43a7..4bf0c61c6 100644 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -17,6 +17,7 @@ """Cook a message's Subject header. """ +import string import re import urlparse from Mailman import mm_cfg @@ -115,6 +116,11 @@ def process(mlist, msg, msgdata): # one copy of each, and we want to be sure it's ours. for h, v in headers.items(): del msg[h] + # Wrap these lines if they are too long. 78 character width probably + # 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') msg[h] = v # # Always delete List-Archive header, but only add it back if the list is |
