From: Wietse Venema (no email)
Date: Fri Feb 01 2008 - 09:56:50 EST
:
> Hi
>
> I am having a problem sending a Dos (CRLF) text file from Linux to Windows
> as an attachment (mimetype = text/plain, encoding = 7bit). I am using mutt
> as my email client and postfix (2.4.5) as my MTA. When the file is
> received the CRLF has been replaced by CRLFCRLF, if I send the same file to
> myself (on Linux) then the CRLF line endings have been replaced with LFLF.
> Creating a double line spacing effect.
>
> To try to narrow down the problem I replaced the MTA that mutt uses with a
> bash script to dump the file out to a log. This log showed that the
> message still contained just one CRLF line ending on each line.
>
> I then ran tcpdump so monitor the outgoing smtp connect that postfix was
> making. This showed that the line ending had changed from CRLF to CRCRLF.
> I am guessing that something somewhere is changing the LF at the end of the
> lines to CRLF despite the fact that each line already contains this
> combination.
>
> I am not sure where to go from here to find out what is going on, any help
> would be appreciated. If you require anymore information please let me
> know.
UNIX systems don't use DOS textfile formats. Use the unix2dos
command (or similar tool) to properly handle DOS text files on a
UNIX system.
If you MUST preserve DOS format send it as base64 encoded attachment.
Wietse
|
|
|