[imp] Problem detecting attachments

Michael M Slusarz slusarz at horde.org
Tue Jul 9 03:36:03 UTC 2013


Quoting Philipp Fäustlin <philipp.faeustlin at uni-hohenheim.de>:

> I have a problem, that Horde doesn't detect *.pdf attachments in  
> multi part emails.
>
> I first have to go to "show all parts" and then I see the attached  
> *.pdf  as shown in following list.
>
> Alternative
>    - Text
>    - Mixed
>       -- Text
>       -- 507.pdf
>       -- Text
>
> The source of the email also says:
> ----------------
> Content-Type: application/pdf; name=507.pdf
> Content-Disposition: attachment; size=67383; filename=507.pdf
> Content-Transfer-Encoding: base64
> ------------------
> but Horde won't detect it as attachment.
>
> I use the Horde Groupware Webmail Edition 5.1 (Imp 6.1.2).
>
> Do I have to change some config?
>
> Is this email not RFC conform?

It was most certainly sent by Apple.  And it is known they have sent  
broken multipart/alternative parts since forever.

That being said, the attachment *should* show up.  We will display the  
multipart part in this instance if ANY of the sub-parts are visible.   
However, both of the text parts under the mixed part are most likely  
marked as "attachment" (and/or you have alternative viewing set to  
plaintext preferred).  PDF's are always treated as an attachment  
(there is no way to view them inline natively/cross-browser).  Thus,  
we fall back to the first text part.

The **entire** purpose of using multipart/alternative is to hide all  
the display details from the end user.  You absolutely can't hide  
"attachments" under an alternative subpart because there is no  
guarantee that this part will ever be displayed.  In this case, the  
PDF is *not* an attachment; it is an alternative way to display text  
to the user.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list