http://bugzilla.novell.com/show_bug.cgi?id=536631 Summary: PHP 5.3 - additional x-php-header can broken the mail header Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Critical Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: freespacer@gmx.de QAContact: qa@suse.de Found By: --- Created an attachment (id=316691) --> (http://bugzilla.novell.com/attachment.cgi?id=316691) fix mail additional x-php-header User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.2) Gecko/20090730 SUSE/3.5.2-2.1 Firefox/3.5.2 OBS-URL: https://build.opensuse.org/package/show?package=php5&project=server%3Aphp If you set php.ini up the options "mail.add_x_header = On". URL: http://de3.php.net/manual/en/mail.configuration.php If you use the function mail(), PHP send an additional header. But the header is broken, because it send "\r\n" instead "\n". Some mail clients or other mail parser can't process the mailheaders, so the severity is critical. Workaround: turn off the "mail.add_x_header" in php.ini I add a patch for this problem in attachement. Reproducible: Always Steps to Reproduce: 1. set php.ini up to "mail.add_x_header = On" 2. create a php file like "mailtest.php" and modified it with your mailaddress: <?php $to = "your.email@address.de"; $subject = "This is a test"; $message = "This is a test\r\nWith more lines\r\nGreets from you script\r\n"; $headers = "From: \"Your Name\" <your.email@address.de>"; mail($to,$subject,$message,$headers); ?> 3. run the script mailtest.php Actual Results:
From - Thu Sep 3 19:53:42 2009 X-Account-Key: account3 X-UIDL: 130e071cdf90a2d19c41ea8fb616ee2f X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: Return-Path: <someuser@sebastian-siebert.com> X-Flags: 0000 Delivered-To: GMX delivery to freespacer@gmx.de Received: (qmail invoked by alias); 03 Sep 2009 17:53:34 -0000 Received: from sebastian-siebert.com (EHLO sebastian-siebert.com) [84.246.123.242] by mx0.gmx.net (mx017) with SMTP; 03 Sep 2009 19:53:34 +0200 Received: by sebastian-siebert.com (Postfix, from userid 0) id 97DC196C15A; Thu, 3 Sep 2009 19:54:19 +0200 (CEST) To: freespacer@gmx.de Subject: This is a test X-PHP-Originating-Script: 0:mailtest.php Date: Thu, 3 Sep 2009 19:53:34 +0200 Message-ID: <20090903175334.21822gmx1@mx017.gmx.net> X-GMX-Antivirus: 0 (no virus found) X-GMX-Antispam: 0 (Mail was not recognized as spam) X-GMX-UID: pjCTfhIsX1VpX2b7QmFy+7R3SDc4NMy+
From: "Sebastian Siebert" <freespacer@gmx.de> Message-Id: <20090903175419.97DC196C15A@sebastian-siebert.com> Date: Thu, 3 Sep 2009 19:54:19 +0200 (CEST) This is a test With more lines Greets from you script Expected Results:
From - Thu Sep 3 19:53:42 2009 X-Account-Key: account3 X-UIDL: 130e071cdf90a2d19c41ea8fb616ee2f X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: Return-Path: <someuser@sebastian-siebert.com> X-Flags: 0000 Delivered-To: GMX delivery to freespacer@gmx.de Received: (qmail invoked by alias); 03 Sep 2009 17:53:34 -0000 Received: from sebastian-siebert.com (EHLO sebastian-siebert.com) [84.246.123.242] by mx0.gmx.net (mx017) with SMTP; 03 Sep 2009 19:53:34 +0200 Received: by sebastian-siebert.com (Postfix, from userid 0) id 97DC196C15A; Thu, 3 Sep 2009 19:54:19 +0200 (CEST) To: freespacer@gmx.de Subject: This is a test X-PHP-Originating-Script: 0:mailtest.php Date: Thu, 3 Sep 2009 19:53:34 +0200 Message-ID: <20090903175334.21822gmx1@mx017.gmx.net> X-GMX-Antivirus: 0 (no virus found) X-GMX-Antispam: 0 (Mail was not recognized as spam) X-GMX-UID: pjCTfhIsX1VpX2b7QmFy+7R3SDc4NMy+ From: "Sebastian Siebert" <freespacer@gmx.de> Message-Id: <20090903175419.97DC196C15A@sebastian-siebert.com> Date: Thu, 3 Sep 2009 19:54:19 +0200 (CEST)
This is a test With more lines Greets from you script -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.