OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Problem sending a DOS text file from Linux to Windows.

scott.postfixscottrix.co.uk
Date: Mon Feb 04 2008 - 03:00:34 CST


On Fri, Feb 01, 2008 at 05:30:04PM +0100, Richard Foley wrote:
>You're not listening to the answer:
>
>Wietse said:
>
>> To send DOS a textfile from a UNIX system use a DOS/UNIX conversion
>> tool or send the file as a base64 encoded attachment.

Let me try to put it another way. How do I know when I need to convert the
file before I send it ? I don't intend to manually check every single text
file that I send to see if I should then manually convert it first.

Using the UNIX file utility with the "-i" option which lists the mime type
it gives:

text/plain; charset=us-ascii

If this is correct, then shouldn't the MTA handle this mime type without
screwing up the file ?

Programmatically it is not difficult, so I assume that the negativity that
I am getting is because I am not getting something, so please please
explain why changing the code to cope with this would be a bad idea.

Scott.

PS. Tried the same thing with exim and this works as it should, i.e.
doesn't introduce the extra CR in the attachment. I don't want to switch
MTAs as I believe Postfix is better in many ways, but I also don't want to
send out broken emails.