[imp] msg bigger than limit_inline_size, download without file extension name

Michael M Slusarz slusarz at horde.org
Mon Jul 15 18:40:43 UTC 2013


Quoting Nethub Online <nethubonline at gmail.com>:

> Sample A (sending via old version of Horde (Horde Groupware Webmail Edition
> 1.2.9)
>
> MIME-Version: 1.0
> Content-Type: multipart/alternative;
>  boundary="=_4odon3t0zmn"
> Content-Transfer-Encoding: 7bit
> User-Agent: Internet Messaging Program (IMP) H3 (4.3.9)
>
> This message is in MIME format.
>
> --=_4odon3t0zmn
> Content-Type: text/plain;
>  charset=UTF-8
> Content-Description: Plaintext Version of Message
> Content-Disposition: inline
> Content-Transfer-Encoding: 7bit
>
>
> --=_4odon3t0zmn
> Content-Type: text/html;
>  charset=UTF-8
> Content-Description: HTML Version of Message
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Result: The file name of download is "HTML_Version_of_Message" which I
> believe about "Content-Description", however is it able to add extension
> name for the file download? (e.g. HTML_Version_of_Message.html)

No extension should be added unless that is how it is sent.   
"Extension" information is pretty much useless these days - even  
Windows doesn't use it anymore.  What is more important is the *MIME  
type* we send when creating the download link.  Any halfway recent OS  
will save that MIME part information in the file's metadata when saving.

> Sample B (sending from Gmail)
>
> MIME-Version: 1.0
> X-Received: by 10.58.211.227 with SMTP id nf3mr17997592vec.20.1373601670297;
>  Thu, 11 Jul 2013 21:01:10 -0700 (PDT)
> Received: by 10.220.15.5 with HTTP; Thu, 11 Jul 2013 21:01:09 -0700 (PDT)
> Date: Fri, 12 Jul 2013 12:01:09 +0800
> Message-ID:  
> <CAJShYw8ECn6y_pB7aTa867n3xGf_fyVneAd7Q8tZcCAjy3rt3A at mail.gmail.com>
> Content-Type: multipart/alternative; boundary=047d7bd6b65a9f048b04e1488f90
>
> --047d7bd6b65a9f048b04e1488f90
> Content-Type: text/plain; charset=ISO-8859-1
>
> test
>
> --047d7bd6b65a9f048b04e1488f90
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"ltr">test<img src=3D"data:image/jpeg;base64,/9j/4RdzRXhpZgAASUk=
> qAAgAAAARAAABAwABAAAAAA8AAAEBAwABAAAAYAkAAAIBAwADAAAA2gAAAAMBAwABAAAABQAAAA=
> YBAwABAAAAAgAAAA4BAgAWAAAA4AAAAA8BAgAGAAAA9gAAABABAgANAAAA/AAAABIBAwABAAAAA=
>
>
>
> Result: The file name of download is "Text", I believe because of no
> "Content-Description", it is no file extension too.

Correct.

> I guess IMP recognize it as text because no "Content-Description", is it a
> bug or need to use other way to recognize the file type?

No.  Content-Description is not machine parseable.  It is recognized  
as a "text" file since that is the primary portion of the MIME type  
(which DOES have a defined syntax).

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list