5 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] reformime doesn't dec...
FromSent OnAttachments
Andreas HasenackFeb 1, 2005 11:20 am.patch
Sam VarshavchikFeb 1, 2005 3:52 pm 
Andreas HasenackFeb 2, 2005 5:04 am 
Sam VarshavchikFeb 2, 2005 4:35 pm 
Andreas HasenackFeb 2, 2005 4:47 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] reformime doesn't decode (QP nor base64) filenames (PATCH)Actions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Feb 1, 2005 3:52:48 pm
List:net.sourceforge.lists.courier-maildrop

Andreas Hasenack writes:

I'm chasing a problem with encoded filename attachments (QP and base64) where reformime isn't decoding them. Like:

------=_NextPart_000_0015_01C50864.97F08000 Content-Type: text/plain; format=flowed;
name="=?iso-8859-1?B?YmzhYmzhLnR4dA==?="; reply-type=original Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="=?iso-8859-1?B?YmzhYmzhLnR4dA==?="

When used with reformime -x, the suggested filename is: _iso-8859-1_B_YmzhYmzhLnR4dA____

An ancient changelog mentions that this should be fixed:

* V1.2 - Switched installation layout to GNU layout. Packaged development libraries. reformime -x option now MIME decodes 8-bit filenames (then promptly strips 8bit characters :-) ).

However, even with current version (1.8.0), get_suitable_filename() would not do it. It would only strip 8bit characters.

That's because the above mutation is not the correct way to encode 8bit characters in MIME headers. This type of QP/Base64 encoding is valid only for the Subject/From/To/Cc/Bcc headers, and a few others.

See RFC 2231 for the correct way to encode these headers.