Bugs item #540978, was opened at 2002-04-08 08:56 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100103&aid=540978&...
Category: mail delivery Group: 2.1 beta Status: Open Resolution: None Priority: 5 Submitted By: Markus Mandalka (mandalka) Assigned to: Nobody/Anonymous (nobody)
Summary: List-* header multiline split bug
Initial Comment: I have a list firstname.lastname@example.org and others with long names.
It seems that mailman can not handle with such long names, because in the subscribe-mail (which you have to answer to be in the list) the first columns are some things from the header (unsubscribe: email@example.com and so on).
Whith names like firstname.lastname@example.org it works.
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-08-23 17:38
Message: Logged In: YES user_id=12800
Changing the summary
Comment By: Nobody/Anonymous (nobody) Date: 2002-08-15 00:37
Message: Logged In: NO
I just installed mailman and can confirm this bug as well.
When the list address + hostname is too long (in my case the listname was north-texas-stovebolters- email@example.com -- 52 characters total) the headers overflow into the body of the message. The "break point" was at the List Subscribe line:
This is header:
List-Subscribe: http://stovebolt.stovebolt.com/mailman/listinfo/north- texas-stovebolters-club, (total of 94 characters before the split)
This is body
firstname.lastname@example.org?subject=subscribe> List-Unsubscribe: http://stovebolt.stovebolt.com/mailman/listinfo/north- texas-stovebolters-club,
email@example.com?subject=unsubscribe> List-Archive: http://stovebolt.stovebolt.com/pipermail/north-texas- stovebolters-club List-Help: mailto:north-texas-stovebolters-club- firstname.lastname@example.org?subject=help Sender: north-texas-stovebolters-club- email@example.com Errors-To: north-texas-stovebolters-club- firstname.lastname@example.org
This is the initial text of the message that was posted.
I'm sure that I'll be there. :-)
It looks like there's a line break or line limit that's causing the problem. Perhaps it's line 33: MAXLINELEN = 78
The first line that breaks (in my case) is a line that has 94 characters in the first part, none of which can be separated (no spaces or line breaks, just continuous text.)
The very next line drops to the body.
I believe giuans is correct that the problem is in the wrap section of the code, because the break occurs immediately after a comma, which, if I'm understanding the code correctly, is inserted by the program after an overlength line occurs, to split the line at 78 (or as close to that as it can get.)
I think the correct fix would be to add the "h" portion subsequent to the split so that each line in the header would have the required semi-colon to indicate that it's header. If the MTA sees a line with no semicolon, it's going to think that it's body text, not header.
Present code: if len(h) + 2 + len(v) > 78: v = CONTINUATION.join(v.split(', ')) msg[h] = v
Possible fix if len(h) + 2 + len(v) > 78: v=CONTINUATION.join(h + v.split(',')) msg[h] = v
or something like that. (I haven't worked with php, so I'm not familiar with its functions and syntax.) The idea is to split a line like this:
Line exceeds 78 characters? h+v, h+ rest of v
Comment By: Jean Millerat (drsigmund) Date: 2002-07-04 04:13
Message: Logged In: YES user_id=70686
I have reached the same bug with mailing list adresses such as <11 characters>@<30 characters> whereas <8 characters>@<30 characters> works properly. The effect of this bug is that the headers of the subcription annoucement or any further email from the list are "mangled" as was said on [mailman-developers]. As an example when one of the List-* header line is too long, it is broken in two parts (and the second part is indented). Since then, Outlook (and I suppose other email clients) think this second part of the broken header line is the beginning of the body of the message. Therefore the remaining headers are sent as part of the body of the message !
I think this bug does not only occur with too long email adresses but may occur with too long header lines whichever line it is (even with the Subject line especially when this subject line is very long because of quoted-printable characters). See [mailman-developers] for the description of maybe the same bug, in mails dealing with headers being "mangled".
My current workarounds :
- using short mailing list names.
- and not sending quoted-printable characters within subject
Comment By: Giovanni Lopedote (giuans) Date: 2002-05-02 10:27
Message: Logged In: YES user_id=531451
I've found it. A fast fix for is to comment lines 149-150 in Mailman/Handlers:/CookHeaders.py:
--- CookHeaders.py 2002-05-02 14:51:36.000000000 +0200 +++ CookHeaders.py.new 2002-05-02 16:12:09.000000000 +0200 @@ -146,8 +146,8 @@ # Wrap these lines if they are too long. 78 character width probably # shouldn't be hardcoded, but is at least text-MUA friendly. The # adding of 2 is for the colon-space separator.
if len(h) + 2 + len(v) > 78:
v = CONTINUATION.join(v.split(', '))
+# if len(h) + 2 + len(v) > 78: +# v = CONTINUATION.join(v.split(', ')) msg[h] = v # Always delete List-Archive header, but only add it back if the list is # actually archiving
Tested with Mailman 2.1b1, Source Mage GNU/Linux 2.4.18, Postfix 1.1.7. I know there should be a better way, but I'm not a Python programmer at all. :)
Comment By: Barry A. Warsaw (bwarsaw) Date: 2002-04-11 18:03
Message: Logged In: YES user_id=12800
I've confirmed this bug, but don't have a fix for it right now.
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100103&aid=540978&...