pimlie / authres_status

Roundcube plugin that checks the Authentication-Results headers (rfc5451) of your emails and displays the verification status.
Other
34 stars 20 forks source link

Wrong regex for extracting From domain #64

Open marc-vanderwal opened 1 year ago

marc-vanderwal commented 1 year ago

The following line uses a regular expression to attempt extracting the domain name of the From header:

https://github.com/pimlie/authres_status/blob/eba58333b1b8e3f0028796857719e77a4dfb767d/authres_status.php#L353

However this regular expression is incorrect, for several reasons:

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.