View Issue Details

IDProjectCategoryView StatusLast Update
0020037phpList 3 applicationBounce Managementpublic21-08-19 11:15
Reporterduncanc Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.4.4 
Target Version3.4.5Fixed in Version3.4.5 
Summary0020037: Failing to identify the email address in a bounce
DescriptionThe bounce processing identifies the subscriber from the X-ListMember header. If that is not present then it falls back to looking for any email addresses in the bounce body to see whether they are a subscriber's email address.

The regex to find email addresses is

        preg_match_all('/[\S]+@[\S\.]+/', $text, $regs);

this looks to be too strict as it expects the email address to be surrounded by white space.

Looking at some bounces to see why they were unidentified, they have lines like this, where the email address is surrounded by square brackets

5.1.0 - Unknown address error 550-'5.4.1 []: =

which means that the regex matches '[]:' which clearly is not a subscriber's email address.

Without worrying too much about matching all possible email addresses, a regex that will match only the characters of the email address, ignoring any surrounding brackets or white space is

        preg_match_all('/[\w\._-]+@[\w\._-]+/', $text, $regs);
TagsNo tags attached.


There are no notes attached to this issue.