From what I have managed to find on the web the SMTP protocol uses CRLF
text to transfer text data around, now I assume that postfix is doing the
conversion from unix text (LF) to SMTP text (CRLF), if the text is already
in that format and since it is text data and not binary is there a problem
with leaving text that is already (CRLF) alone ?
Regards,
Scott.
> >Local text MUST be in UNIX text format. Postfix will convert between
> >network formats and local formats.
>
> Are you saying that a DOS text file on Linux is actually a "binary" file
> and should not have a text/plain mime type ?
>
> If I wanted to modify this behaviour and "break" my system where in the
> postfix code does it do this conversion ?
tr -d '\015' < dos_text_file > real_text_file
Then mail the "real_text_file". If you want to undertake independent
Postfix development, ... good luck.
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majo...@postfix.org?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
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.
>
--
Richard Foley
Ciao - shorter than aufwiedersehen
04.02.2008 12:00, scott....@scottrix.co.uk пишет:
> 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 ?
Possibly nohow, as "fromdos" is a safe filter. It does nothing bad with
an unix text.
$ man fromdos
"The default is to remove carriage returns only if they are followed
by line feeds."
Alexey
it's up to you (to switch to exim or not), but in principle you can't do
# sendmail ... < foo.mp4
mail data must obey some constraints.
with text files, you can still do
# dos2unix foo.txt | sendmail ....
the dos2unix command will convert the file to "unix format" if it was in
dos format.
> 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.
> 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...
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.
> >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.
This is wrong. The message must either use CRLF for all message lines
(RFC822 message) or LF for all message lines (unix message file).
> 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
The MIME type is not the problem, mutt should be stripping the CR when
encoding the text file into a message whose headers and body are LF
terminated.