Is the format of the headers right?
- To: mutt-users@xxxxxxxx
- Subject: Is the format of the headers right?
- From: liujiaping <ljiaping@xxxxxxxxx>
- Date: Fri, 14 Jul 2006 22:49:16 +0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:mail-followup-to:mime-version:content-type:content-disposition:user-agent; b=Y8axncB/2abELv91rfPL0aejqC7riL9m1xBBvD09KR5WppZgaGff3nm6BdQzJ7vzQHbh9nimY2KbrPfOJjPg+y/61nfCokZzkdxZA4hVKa5EhVs5kngbBNRP4lmhgiHdwfN1glLIIsmOgDSv6Z1a2XP4cybsvYn8MO2ghAouhY8=
- List-unsubscribe: <mailto:mutt-users-request@mutt.org?body=unsubscribe>
- Mail-followup-to: mutt-users@xxxxxxxx
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.11
Hi, all. I have used mutt for nearly two months, and I have a problem that I
can't solve.
One time I sent a mail to my classmate with an attachment, and the attachment
has a Chinese filename. In my .muttrc I have set "$send_charset" to
"us-ascii:iso-8859-1:gb2312:utf-8". So mutt uses the charset "gb2312" to encode
the filename. I used vim to view the raw message, the headers looked like this:
Content-Type: application/pdf
Content-Disposition: attachment; filename*=gb2312''%C0%EE%D7%D3%D1%AB%2Epdf
Content-Transfer-Encoding: base64
When my classmate received the mail(he likes to view his mails on the web with a
web browser:P), he found that the mail doesn't have any attachment at all! But
the raw message he received has the headers above, and the size is nearly the
same as the one I have sent. So I supposed the attachment was encoded in the raw
message, but the mail client wasn't able to parse the header.
Then I made another test. I sent the same message with the same attachment to my
classmate with gmail's web interface. And this time he received the mail with
the right attachment! It seemed strange to me. Again I used vim to view the raw
message he received, the headers looked like this:
Content-Type: application/pdf; name="=?GB2312?B?wO7X09GrLnBkZg==?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?GB2312?B?wO7X09GrLnBkZg==?="
The two kind of headers were different, of course! And I found the two kind of
filename headers had the different formats. I didn't know which one was right,
so I refered to the rfc2047 document. I found in this document the syntax of
encoded-words looks like this:
encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
It seems that the second kind of headers are right.
Then I made many other tests. I used mutt to send mails to my own gmail account,
and hotmail account. And the first kind of headers were also parsed.
My question is, is the format of the first kind of headers right? Or Can I
change some settings to make mutt follow the format of the second kind of
headers?
Thank you in advance. And forgive my poor English:)
--