You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (preg_match("/[@]([a-zA-Z0-9]+([.][a-zA-Z0-9]+)?\.[a-zA-Z]{2,4})/", $headers->from, $m)) {
However this regular expression is incorrect, for several reasons:
domain name labels (including top-level domains) may also contain hyphens;
TLDs exist that are more than 4 characters long, e.g. .paris (and there are much longer TLDs on ICANN’s list).
On a closed test network where I was using domain names ending in .example, this causes an e-mail whose sender domain is sender.example to be labeled STATUS_THIRD by this plugin despite SPF, DKIM and DMARC passing, all at sender.example. Adjusting the {2,4} to {2,7} as a test yielded STATUS_PASS instead.
The text was updated successfully, but these errors were encountered:
Thanks for the report, seems I fixed this last year already but forgot to resolve this issue. See #71, just reverted back to the most basic domain extraction I know ;)
The following line uses a regular expression to attempt extracting the domain name of the From header:
authres_status/authres_status.php
Line 353 in eba5833
However this regular expression is incorrect, for several reasons:
.paris
(and there are much longer TLDs on ICANN’s list).On a closed test network where I was using domain names ending in
.example
, this causes an e-mail whose sender domain issender.example
to be labeledSTATUS_THIRD
by this plugin despite SPF, DKIM and DMARC passing, all atsender.example
. Adjusting the{2,4}
to{2,7}
as a test yieldedSTATUS_PASS
instead.The text was updated successfully, but these errors were encountered: