* thunderbird/icedove and inline pdf attachments
Posted on April 23rd, 2009 by Alex. Filed under Linux.
Recently I experienced problems with PDF attachments in Thunderbird or Icedove as it is called in Debian. The document is inlined, but also sent as attachment. In Thunderbird extracting the attachment is not a problem. However other mail clients do not recognize the PDF as attachment and display lots of garbage in the message text.
It might look like this:
This is a test mail.
%PDF-1.3
%Çì¢
5 0 obj
<>
stream
xœÍ}[sÇ‘f„çM/óðl=]÷ªyZÛ’RçWrSf×áüyýu}q)6ï´päϯ/Älêü}þ³õç?_\*£6çÄù}{zOµß<ýö¤ƒÎœoHo¦ O¿ÁŸ»ße8ÿzsV)þ=ûê¿bzSJžÿº½P;Öå©×{8Ó†F~¾]HeéÐÛ|ŸÅ_úzQÿ\XÀŠâÆX¹y}v k.ý.Òú–!©aÝô&Ín,°Ývüñ7ææö]èïRC[»Hƒ‡§ÒxÜ€òÂóöÂ[x*ã*ÉM›ÝXúÇÖMý…£½
The problem is that the PDF is attached as “text/pdf”. If the message is displayed as source (go to “View” -> “Message Source”) you can check it by yourself. Somewhere in the mail you can find something similar to this:
[...]
————–050800000902000902020904
Content-Type: text/pdf;
name=”PDFdocument.pdf”
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename=”PDFdocument.pdf”JVBERi0xLjMKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURl
Y29kZT4+CnN0cmVhbQp4nM19W3Mdx5FmhOdNL/MX8AhsCD1d96p5WtuSPFprZa/NidgIjR5A
[...]
The last 2 lines above are the actual attachment represented in base64 encoding. The section should read
[...]
————–050800000902000902020904
Content-Type: application/pdf;
name=”PDFdocument.pdf”
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=”PDFdocument.pdf”JVBERi0xLjMKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURl
Y29kZT4+CnN0cmVhbQp4nM19W3Mdx5FmhOdNL/MX8AhsCD1d96p5WtuSPFprZa/NidgIjR5A
[...]
to work. So somehow the Content-Type setting got messed up. The solution to this problem is quite easy:
- Close Thunderbird/Icedove
- Go to the working directory of the Thunderbird/Icedove installation. On my machine that is
cd ~/.mozilla-thunderbird/98j7l74z.default/. - Move
mimeTypes.rdfto a new file name:mv mimeTypes.rdf mimeTypes.rdf.bak. It will be regenerated the next time Thunderbird/Icedove starts. - Start Thunderbird/Icedove and check, if it works.
August 25th, 2009 at 3:22 pm
Thank you!! This was driving me nuts…all better now!
[REPLY]