I'm not an expert (or close to it) -- this may be slightly
incorrect. It's just my understanding of what I've seen said on the list
(and seen in practice).
Qmail enforces the position that SMTP messages should not contain
bare-newlines at the end of the line, and that instead CRNL pairs should
be used. (I'm not about to debate the correctness of this, I really don't
mind either way).
So, to fix my CGI scripts, I had to replace every \n with \r\n, and for
here-documents, I had to do:
print <<__END_DATA;
Subject: $subject\r
To: $to\r
\r
Hi!\r
.\r
__END_DATA
The extra '\r's made qmail happy.
I believe you can also work around this on the server side by getting the
"fixcr" program from the ucspi-tcp distribution and inserting it in the
qmail-smtp pipeline.
Troy
On Today, at 10:50am, Benjamin de los Angeles Jr. said:
|
| What do you mean by stray newline? Is it extra new line(s) i.e.
| send S,"HELO\n\n",0 ?
|
| On Wed, 12 Jan 2000, Troy Morrison wrote:
|
| >
| > I would guess (since he got it from a CGI script trying to send mail via
| > SMTP) that qmail-smtpd saw a message with a stray newline. (I used to get
| > this a lot when we switched over to qmail -- all of my CGI scripts that
| > send mail ran into it.)
| >
| > You might look at
| >
| > http://www.ornl.gov/its/archives/mailing-lists/qmail/1999/03/msg00866.html
| >
| > (although I chose instead to fix the offending CGI scripts).
| >
| > Troy
| >
| >
|
|