formatting txt file
Mark Sapiro
mark at msapiro.net
Mon Mar 14 19:46:14 GMT 2011
On 11:59 AM, Alexandre Gorges wrote:
> Yes, I compared the files.
> there are two files in the zip link
> http://www.dag.eti.br/suporte/mailscanner/txt.zip
> correct.rem the file is the file without going through mailscanner,
> wrong.rem the file is the same file, but passing by mailscanner.
>
> only when I use postfix, the file is delivered normally. when I use
> postfix + mailscanner the problem appears. the mailscanner should just
> read the file, not change. and somehow it seems that mailscanner is
> rewriting the txt.
How are the files sent in the email?
If I run 'file' on your two files, I see that correct.rem has <CRLF>
line terminators and wrong.rem has only <LF> terminators. If I attach
the two files to an email and send it to myself, it makes no difference
whether the mail passes through MailScanner or not. What determines the
line terminators on the attachments saved from the email is the MUA that
I use to save them. If I use Thunderbird on Windows, both files are
saved with <CRLF> and if I use mutt on Unix, both files are saved with
<LF>. In other words, they are text files and they are saved in the
normal format for text files on the platform. For transfer between MTAs
via SMTP, they are always transferred with <CRLF> line terminators per
the SMTP standard. If you want to preserve the line endings, the file
has to be sent encoded and with some content type other than text, e.g.
application/octet-stream.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the MailScanner
mailing list