[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linebreaks \r\n



Malte Hubner <malte@huebner.com> wrote:
> 
> >If I were to throw out a guess, I would say that, IIRC, the interfaces to
> >most MTA's (i.e., other than during an SMTP transaction) expect only single
> >line breaks on input. These line breaks are converted to CRLF pairs either
> >before or during an SMTP transaction. Therefore, either two things could be
> >happening: 1) the carriage returns are being converted to newlines so the
> >headers are being messed up; or
> 
> why are they converted? I used php and mail() function for quite a long time
> with sendmail and sendmail had no problem with the \r\n linebreaks which
> where generated by php (in form-posted data for example). I also think, that
> it is better to use them, because everywhere i read that it's prescribed by
> RFC.

No, the RFC (2821) only affects SMTP.  It doesn't say anything about how a
commandline mail injection tool like /usr/sbin/sendmail should work.  Perhaps
the "real" sendmail just munges what you inject; qmail-inject doesn't  doesn't
do this.  Are your PHP scripts calling the qmail sendmail wrapper, or
qmail-inject?

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                            <qmail@discworld.dyndns.org>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
-----------------------------------------------------------------------