Bug #69087 [NEW]: imap_headerinfo wrong parse fromaddress header

From: Date: Fri, 20 Feb 2015 09:12:23 +0000
Subject: Bug #69087 [NEW]: imap_headerinfo wrong parse fromaddress header
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190836@lists.php.net to get a copy of this message
From: piotroo89 at gmail dot com Operating system: Debian/Ubuntu PHP version: 5.4.38 Package: IMAP related Bug Type: Bug Bug description:imap_headerinfo wrong parse fromaddress header Description: ------------ Debian GNU/Linux 7 - PHP 5.4.36-0+deb7u3 Ubuntu 14.10 - PHP 5.5.12-2ubuntu4.2 Problem with parse imap headers from mailer delivery daemon. Header from isn't properly handled in case when mail came form mailer daemon. Test script: --------------- This is mail: Delivered-To: addr@foo.bar Received: by 10.64.25.193 with SMTP id e1csp360082ieg; Wed, 18 Feb 2015 23:21:19 -0800 (PST) X-Received: by 10.180.73.241 with SMTP id o17mr7637081wiv.16.1424330476433; Wed, 18 Feb 2015 23:21:16 -0800 (PST) Return-Path: <> Received: from antyspam.addr@bar.baz (smtp.addr@bar.baz. [0.0.0.0]) by mx.google.com with ESMTPS id ft7si39444898wjb.169.2015.02.18.23.21.15 for <addr@foo.bar> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 23:21:16 -0800 (PST) Received-SPF: none (google.com: antyspam.addr@bar.baz does not designate permitted sender hosts) client-ip=0.0.0.0; Authentication-Results: mx.google.com; spf=none (google.com: antyspam.addr@bar.baz does not designate permitted sender hosts) smtp.mail= Received: by antyspam.addr@bar.baz (Spam Firewall) id 40635119E0BB; Thu, 19 Feb 2015 08:21:15 +0100 (CET) Date: Thu, 19 Feb 2015 08:21:15 +0100 (CET) From: MAILER-DAEMON (Mail Delivery System) Subject: Undelivered Mail Returned to Sender $result = imap_headerinfo($, 1); Expected result: ---------------- stdClass Object ( [date] => Thu, 19 Feb 2015 08:21:15 +0100 (CET) [Date] => Thu, 19 Feb 2015 08:21:15 +0100 (CET) [subject] => Undelivered Mail Returned to Sender [Subject] => Undelivered Mail Returned to Sender [message_id] => <20150219072115.40635119E0BB@antyspam.foo.foo> [fromaddress] => MAILER-DAEMON [toaddress] => addr@foo.bar [to] => Array ( [0] => stdClass Object ( [mailbox] => addr [host] => foo.bar ) ) [Recent] => [Unseen] => U [Flagged] => [Answered] => [Deleted] => [Draft] => [Msgno] => 752 [MailDate] => 20-Feb-2015 08:20:13 +0000 [Size] => 23704 [udate] => 1424420413 ) Actual result: -------------- stdClass Object ( [date] => Thu, 19 Feb 2015 08:21:15 +0100 (CET) [Date] => Thu, 19 Feb 2015 08:21:15 +0100 (CET) [subject] => Undelivered Mail Returned to Sender [Subject] => Undelivered Mail Returned to Sender [message_id] => <20150219072115.40635119E0BB@antyspam.foo.foo> [toaddress] => addr@foo.bar [to] => Array ( [0] => stdClass Object ( [mailbox] => addr [host] => foo.bar ) ) [Recent] => [Unseen] => U [Flagged] => [Answered] => [Deleted] => [Draft] => [Msgno] => 752 [MailDate] => 20-Feb-2015 08:20:13 +0000 [Size] => 23704 [udate] => 1424420413 ) -- Edit bug report at https://bugs.php.net/bug.php?id=69087&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69087&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69087&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69087&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69087&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69087&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69087&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69087&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69087&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69087&r=support Expected behavior: https://bugs.php.net/fix.php?id=69087&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69087&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69087&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69087&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69087&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69087&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69087&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69087&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69087&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69087&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69087&r=mysqlcfg

« previous php.bugs (#190836) next »