|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Noel Jones (njones
megan.vbhcs.org)
Date: Mon Feb 04 2008 - 10:22:40 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
scott.postfix
scottrix.co.uk wrote:
> On Mon, Feb 04, 2008 at 10:10:43AM -0500, Victor Duchovni wrote:
>> On Mon, Feb 04, 2008 at 02:57:38PM +0000, scott.postfix
scottrix.co.uk
>> wrote:
>>
>>> Sorry for being a pain, but I want to get this clear. I can only see
>>> two things that could be wrong to get to the problem I am having.
>>>
>>> 1) Postfix is broken and should be detecting when text/plain
>>> attachments have CRLF and not add the CR.
>>
>> Postfix is an MTA. It is the MUA's responsibility to inject valid
>> content.
>
> Fair enough.
>
>>> 2) My MUA (mutt) is broken and is incorrectly identifying a DOS text
>>> file as text/plain when it is not.
>>
>> The MUA (mutt) is responsible for submitting valid content. What are you
>> doing with mutt, and what MIME content is mutt generating? Configure
>> mutt to use a custom "sendmail" that just saves the message to a disk
>> file. Report what you find in the disk file...
>
> A text file is produced with the email in it, the attachment is
> text/plain and the attachment has CRLF for each of it's lines.
>
> It seems the problem is with the MUA (mutt) and I believe that mutt gets
> the mime type from libmagic which also reports text/plain for the DOS
> text file. It can the tell the difference since "file dos.txt" gives
>
> "ASCII text, with CRLF line terminators"
>
> So I guess I can get it to give a different output for the mimetype too.
>
> Thanks for all your help with this,
>
> Scott.
You're making this too complicated. The MUA software is
expected to do the conversion for you.
When an attachment is marked as "text/plain" it's expected to
be in the system's native encoding. The MUA on the receiving
system will then alter the line ending as appropriate for the
receiving system.
When sending a text file from a Unix system, mime type
text/plain must not end in CRLF.
If you want to send a text attachment to an DOS/Windows
system, just send it as a native Unix text file and the
DOS/Windows MUA should present the attachment as a proper DOS
text file. You need not bother with any utilities to
add/remove the CR.
If you need to send a file that is already encoded with CRLF
on Unix, then it's not a Unix text file and shouldn't be sent
as text/plain, and must be base64 encoded as a binary file.
--
Noel Jones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]