NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017035phplist applicationBounce Managementpublic25-01-14 12:0401-02-14 02:14
PlatformOSOS Version
Product Version3.0.5 
Target Version3.0.6Fixed in Version3.0.6 
Summary0017035: Bounce processing not identifying message id
DescriptionAfter 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 [^]

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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
duncanc (developer)
25-01-14 12:21

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.
duncanc (developer)
25-01-14 13:58

See GitHub pull request [^]

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker