[imp] problem with text/plain attachments and linebreaks

Jan Schneider jan at horde.org
Thu Jan 5 10:30:51 UTC 2012


Zitat von Michael Menge <michael.menge at zdv.uni-tuebingen.de>:

> Hi,
>
> I have the following problem. If I attach a Linux plain text file
> (ASCII text with LF line terminators), send it and save the attachment
> from the received mail using IMP 4.3.9, the attachment is saved as
> as DOS plain text file (ASCII text with CRLF line terminators).
>
> The File is attached as
>
> Content-Type: text/plain;
>  charset=UTF-8;
> Content-Disposition: attachment;
> Content-Transfer-Encoding: 7bit
>
> which is correct AFAIK. If I don't misunderstand RFC 2046 4.1.1
> the line terminators must be converted to CRLF for the text/plain
> MIME-Type. I would expect that the file is converted back when it
> is stored to disk on a Linux system. But I'm not sure if IMP or
> the browser has to convert the file?
>
> The browsers I tried (Firefox 7, Opera 11 and Konqueror 4) did not
> change the line terminators back to LF. Saving the attachment using
> Thunderbird 5 or pine, did change the line terminators back to LF,
> so other mail clients handle this problem correct.
>
> Is there a option in IMP or the browsers i did miss?

IIRC there was a long discussion about this a few years ago, and the  
bottom line was, that we simply don't know what the target system is,  
because we don't know the user's system, and the server system isn't  
necessarily the same like the user's either. Most probably it's not.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the imp mailing list