package mutt retitle 364941 mutt: wish less strict RFC 2047 header decoding severity 364941 wishlist tags 364941 patch thanks
Hello Dmitry, and thank you for the report. On Thursday, April 27, 2006 at 0:02:52 +0400, Dmitry E. Oboukhov wrote: > in .muttrc: set rfc2047_parameters = yes The $rfc2047_parameters setting is relevant to attachment filename decoding, not to subject. >| Subject: =?koi8-r?Q?iXBT BBS=3A =F2=C5=C7=C9=D3=D4=D2=C1=C3=C9=CF=CE=CE=C1=D1 >| =C9=CE=C6=CF=D2=CD=C1=C3=C9=D1 =C4=CC=D1 nobody=2C eet=40uvw=2Eru?= > not correct showed in mutt (RFC-correct header) This encoded word contains spaces, and that's prohibited. The mailer sending such invalid RFC 2047 subject is at fault. Mutt is strict on that: Feature, no bug. Now, such invalid 2047 headers are unfortunately not rare in the wild, and Mutt's strictness may be seen as an annoyance. See undecided pros and cons discussion in upstream wish/1062. There are 2 alternatives for this Bug#364941 here: -1) Close Bug#364941 as not a Mutt bug. -2) Apply the attached patch relaxing strictness to spaces and tabs. In practice I never had a single drawback using it here in production since years. I vote for (2) but don't decide. What do you think? Note: There are various similar patches floating around, relaxing yet more Mutt's strictness, to question marks, or to spaces even in the charset label. I'm not for that, because prevalence of such broken mails is low, and so low would be the practical benefit. While possible existence of drawbacks is not thoroughly checked. Bye! Alain. -- « Be liberal in what you accept, and conservative in what you send. » Jon Postel / Robustness Principle / RFC 1122
diff -dur mutt-1.4/rfc2047.c mutt-1.4.mod/rfc2047.c --- mutt-1.4/rfc2047.c Sat Apr 20 09:25:49 2002 +++ mutt-1.4.mod/rfc2047.c Mon Jun 10 19:01:55 2002 @@ -705,7 +707,7 @@ ; if (q[0] != '?' || !strchr ("BbQq", q[1]) || q[2] != '?') continue; - for (q = q + 3; 0x20 < *q && *q < 0x7f && *q != '?'; q++) + for (q = q + 3; 0x20 <= *q && *q < 0x7f && *q != '?' || *q == 0x09; q++) ; if (q[0] != '?' || q[1] != '=') { --- PATCHES Tue Nov 6 19:59:33 2001 +++ PATCHES Tue Nov 6 19:59:42 2001 @@ -1,0 +1 @@ +patch-1.4.ab.decode_2047_invalid.2