From: nestor at sakimori-x dot com Operating system: WinXP SP3 PHP version: 5.2.10 PHP Bug Type: Mail related Bug description: "\n." is incorrectly replaced with "\n.."
Description: ------------ The SMTP spec states (sec. 4.5.2) that all instances of "<CRLF>." (not including the SMTP message-ending "<CRLF>.<CRLF>" sequence) should be replaced with "<CRLF>..". It seems PHP is replacing all instances of "<LF>." with "<LF>..", regardless of the presence of a "<CR>" character. This was originally reported as bug #623 way back in 1998 and is still an issue. Reproduce code: --------------- mail($test_address, "test subject", "abc\n.jkl\r\n.xyz\r\nzzz"); Expected result: ---------------- An SMTP message containing "abc\n.jkl\r\n..xyz\r\nzzz" should be sent. Actual result: -------------- An SMTP message containing "abc\n..jkl\r\n..xyz\r\nzzz" is sent. This was confirmed with a packet sniffer (no server logs/reports or mail clients to muddy the waters). -- Edit bug report at http://bugs.php.net/?id=49076&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49076&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49076&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49076&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49076&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49076&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49076&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49076&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49076&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49076&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49076&r=support Expected behavior: http://bugs.php.net/fix.php?id=49076&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49076&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49076&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49076&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49076&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49076&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49076&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49076&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49076&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49076&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49076&r=mysqlcfg
