NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1
|Anonymous | Login | Signup for a new account||22-05-17 22:17 BST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017035||phplist application||Bounce Management||public||25-01-14 12:04||01-02-14 02:14|
|Target Version||3.0.6||Fixed in Version||3.0.6|
|Summary||0017035: Bounce processing not identifying message id|
|Description||After processing bounces the view bounces page showed all bounces with the correct user id but with "unidentified" in the message column.|
Reviewing some of the bounces they all had the correct X-MessageId header.
The cause of not identifying the message id seems to be use of the \R escape sequence in some regular expressions. See file admin/processbounces line 107
preg_match ("/X-ListMember: (.*)\R/iU",$text,$match);
There are a couple of issues here:
1) using a backslash in a double-quoted string is a bit confusing as that is usually for escaping a non-printable character. In this case R has no special meaning so the \R is left untouched and passed through to the regex engine. But I think that it would be clearer to use single quotes.
2) The \R sequence is not documented on the php web site but I found it on the PCRE site. The change log for PCRE shows that it was introduced in Version 7.0 19-Dec-06
see http://www.pcre.org/changelog.txt [^]
phpinfo showed that my client is running php 5.2.17 with PCRE library 6.6 06-Feb-2006 so the use of \R is not compatible with some currently used versions of php. He has a shared hosting account so is not able to use a later version of php.
The simplest fix is to replace \R with \r\n. The SMTP specification requires \r\n as the line separator so there is no need to test for other line-endings, which is what \R does.
|Tags||No tags attached.|
Reviewing function findUserID(), which also has regular expressions using \R, the final processing of looking for any email addresses in the bounce seems to be performed unconditionally. The comment seems to say that it should be done only when a userid has not been found.
### if we didn't find any, parse anything looking like an email address and check if it's a subscriber.
If it's ok, I can tidy-up this processing and submit a GitHub pull request.
|See GitHub pull request https://github.com/michield/phplist/pull/21 [^]|
|Copyright © 2000 - 2017 MantisBT Team|