<<< Date Index >>>     <<< Thread Index >>>

Re: mutt freezes when fed high character in header



[ Cc'ing mutt-dev ]

* Breen Mullins on Tuesday, July 03, 2007 at 11:59:16 -0700:
> I had mutt freeze (again) while opening an mbox today. It gets to
> the point where it prints 'sorting mailbox' and hangs.

I know what you're talking about :(

<http://dev.mutt.org/trac/ticket/2560>

> I finally tracked it down to a message containing a From: header in
> which an 8-bit character wasn't properly encoded:
> 
> X-Amavis-Alert: BAD HEADER, Non-encoded 8-bit data (char E6 hex): From:     
>    "Danny Kj\346r..."
> 
> (Nice of amavis to point that out.)
> 
> Remove the message from the mbox and it opens just fine. 
> Here's my mutt -v:
> 
> 
> Mutt 1.5.16 (2007-06-09)
> 
> System: Darwin 7.9.0 (Power Macintosh)
> ncurses: ncurses 5.2.20020209 (compiled with 5.2)
> libiconv: 1.9

A more recent version of iconv might help:

System: Darwin 8.10.0 (Power Macintosh)
ncurses: ncurses 5.4.20041023 (compiled with 5.4)
libiconv: 1.11
libidn: 0.6.12 (compiled with 0.6.12)

Also you probably can reduce the /probability/ of this happening
by adding the following to your muttrc:

set assumed_charset="cp1252"
charset-hook ^unknown-8bit$   cp1252
charset-hook ^x-unknown$      cp1252
charset-hook ^x-user-defined$ cp1252
charset-hook ^us-ascii$       cp1252
charset-hook ^iso-8859-1$     cp1252
charset-hook ^iso-8859-8-i$   iso-8859-8
charset-hook ^gb2312$         gb18030

But I still believe that Mutt should not just *freeze* in case of
an iconv failure, but give the user some means to isolate the
message (including removing it from the mailbox) ... and then you
still need to pray that Alain Bench is around to give you some
ideas how to handle these messages ;)

c
-- 
Python Mutt utilities <http://www.blacktrash.org/hg/muttils/>