[Imap-protocol] Interesting gmail IMAP RFC 2047 encoding

Philip Guenther guenther+imap at sendmail.com
Tue Dec 4 17:00:07 PST 2007

On Tue, 4 Dec 2007, Brendan Cully wrote:

> I've just received a spate of complaints from mutt users that that

> non-ascii addresses are not being decoded in the index view, but are

> in the message view. Apparently gmail is encoding them differently

> depending on whether BODY.PEEK is given a filter or not:


> To: =?ISO-8859-1?Q?Br=E9ndan_Cully_<xxxxxxxxxxxxxxx at gmail.com>?=

> From: =?ISO-8859-1?Q?Br=E9ndan_Cully_<brendan at xxxxxx.com>?=


> 7< * 111 FETCH (UID 573 BODY[] {2273}


> To: =?iso-8859-1?Q?Br=E9ndan?= Cully <xxxxxxxxxxxxxxx at gmail.com>

> From: =?iso-8859-1?Q?Br=E9ndan?= Cully <brendan at xxxxxx.com>


>> From my reading of RFC 2047 section 5.3, the first version is

> performing illegal encoding on the From and To addresses:


> + An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'.


> But I'd appreciate it if anyone could confirm my reading. If this is a

> bug in google's IMAP server I'd rather not fix it in mutt.

Yes, that's broken. If nothing else, the data returned for
BODY[HEADER.FIELDS (...)] must match the data for BODY[].

Philip Guenther

More information about the Imap-protocol mailing list