ID:               15841
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         Mail related
 Operating System: Linux
 PHP Version:      4.1.2
 Assigned To:      yohgaki
 New Comment:

My phpinfo() says:
sendmail_path    /usr/bin/sendmail -t -i 

I'm running a vanilla qmail installation.

The mail() function works fine... it passes to the MTA whatever data
the user supplies for headers, with whatever line breaks the user
supplied.

The problem is that the line breaks should be unix-style on a Unix
system. But they need to be DOS-style on Windows. This creates a
portability issue for PHP scripts.

See my comment of 6 Mar 2:58pm for an example of the problem when using
DOS-style line breaks on a Unix system.


Previous Comments:
------------------------------------------------------------------------

[2002-05-25 19:09:15] [EMAIL PROTECTED]

I looked for CRLF in source, but I cannot find CRLF with quick glance
of current CVS source.
It seems mail.c is not converting LF to CRLF.

Are you using qmail-inject or qmail sendmail wrapper?
I don't have any problem with qmail-inject nor qmail's sendmail
wrapper.





------------------------------------------------------------------------

[2002-05-25 11:41:19] [EMAIL PROTECTED]

I would be VERY nice if PHP would at least have the option of sending
mail using SMTP when running under Unix.  It seems silly to support the
option only when running under Windows, especially when the code is
already written.

------------------------------------------------------------------------

[2002-04-23 00:43:02] [EMAIL PROTECTED]

reclassified

------------------------------------------------------------------------

[2002-03-07 04:48:56] [EMAIL PROTECTED]

ok

1) blame qmail, it should know better ...
2) lets have SMTP as a default implementation
   for Unix mail(), too, instead of relying
   on external programs

the "it isn't broken, so don't fix it" argument
got even weaker right now ...

------------------------------------------------------------------------

[2002-03-06 14:58:38] [EMAIL PROTECTED]

The point is that it is incorrect to send DOS line endings to a Unix
command line program.

Sending a message through qmail (for example) with \r\n line endings
results in extraneous \r's in the delivered email. qmail assumes the
user knows what they're doing and converts only the '\r' characters to
'\r\n'. So if you use '\r\n' it injects '\r\r\n' into the SMTP
conversation.

e.g. 
Headers:
"X-1: test1\nX-2: test2\r\nX-3: test3\r\nX-4: test4:

Message:
Subject: test message
X-1: test1
X-2: test2^M
X-3: test3^M
X-4: test4

I notice that some mail readers sanitize the incoming message and strip
the extra \r's (e.g. Eudora) but Mozilla doesn't and only the first
extra header is displayed as a header while the others appear in the
body of the message.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15841

-- 
Edit this bug report at http://bugs.php.net/?id=15841&edit=1

Reply via email to