[imp] IMP is breaking certain attachments.

Michael M Slusarz slusarz at horde.org
Wed Nov 17 21:22:02 UTC 2010


Quoting Adam Tauno Williams <awilliam at opengroupware.us>:

> Horde 3.3.4 / IMAP H3 4.3.4 / PHP 5.2.12
> PEAR: Mail_Mime 1.8.0 Fileinfo 1.0.4
>
> I'm having an issue where certain files attached to messages in IMP get
> corrupted. Almost all files work. But for some files, I believe, IMP is
> not base64 encoding them.  On the corrupted files the message source
> looks like :
>
> --=_52mp429tmh8o
> Content-Type: text/base64;
>  charset=UTF-8;
>  name="Nov17-120851.pdf"
> Content-Disposition: attachment;
>  filename="Nov17-120851.pdf"
> Content-Transfer-Encoding: quoted-printable
>
> %PDF-1.2
> %=C7=EC=8F=A2
> 5 0 obj
> <</Length 6 0 R/Filter /FlateDecode>>
> stream
> x=9C=B5TKo=141=0C=16=D0=D2v=A8
>
> If I send the same file from the same place using Evolution the message
> source looks like the following and the attachment is valid -
>
> --=-FUqo8thPdax4QuBo+m5u
> Content-Type: application/pdf; name="Nov17-120851.pdf"
> Content-Disposition: attachment; filename="Nov17-120851.pdf"
> Content-Transfer-Encoding: base64
>
> JVBERi0xLjIKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29k
> ZT4+CnN0cmVhbQp4nLVUS28UMQwW0NJ2qAoUyvuR8owPY+K8c0UgJG6tRuJAeyoCDt2i7f8/4JnZ
>
> But IMP does encode other messages correctly, like -
>
> --=_3wzm200uoccg
> Content-Type: application/x-zip;
>  name="groupdav-2.5.s4j"
> Content-Disposition: attachment;
>  filename="groupdav-2.5.s4j"
> Content-Transfer-Encoding: base64
>
> UEsDBAoAAAAAAO6jPzwAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAFBLAwQKAAAACADtoz88
>
>
> It isn't just PDF-files-do-not-attach, some PDF files do.  I've tried
> these files on Windows, LINUX, attaching from different folders, etc...
> The broken attachments do appear as different sizes than files that are
> correctly attached.

Your browser is reporting the wrong MIME type.  IMP does not base64  
encode text attachments.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]




More information about the imp mailing list