After upgrading to CentOS7 with cPanel 86.0.04 some incoming email bounce due to SPF check.
Most of those emails have a valid sender IP address that matches domain SPF record but for some reason Exim's SPF fail to match but if I run a test on numerous validators (online or command line) that same sender / spf record are correct.
From what I've noticed here's two cases where Exim's SPF fails:
- SPF check does not follow the 'a' tag to the respective IP address but if the record contains ip4:xxx (with the same IP as the A record) it passes;
- The 'exists:' tag is not processed correctly PTR records with wildcard records
Here's some proof / test so someone can take a look at it.
Example rejection:
H=smtp1.example.pt (anubis04.example.pt) [<IPAddress>]:11970 X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no F=<******@example.pt> rejected RCPT <******@******>: SPF: <IPAddress> is not allowed to send mail from example.pt
SPF record for example.pt:
v=spf1 a:smtp1.example.pt a:smtp2.example.pt a:smtp3.example.pt a:smtp4.example.pt a:smtp5.example.pt a:newsletter.example.pt include:spf.protection.outlook.com -all
Sender IP address matches the SPF record:
smtp1.example.pt. 21600 IN A <IPAddress>
How can I tweak / fix this? Is this check some external call?
Thanks,
PM
Most of those emails have a valid sender IP address that matches domain SPF record but for some reason Exim's SPF fail to match but if I run a test on numerous validators (online or command line) that same sender / spf record are correct.
From what I've noticed here's two cases where Exim's SPF fails:
- SPF check does not follow the 'a' tag to the respective IP address but if the record contains ip4:xxx (with the same IP as the A record) it passes;
- The 'exists:' tag is not processed correctly PTR records with wildcard records
Here's some proof / test so someone can take a look at it.
Example rejection:
H=smtp1.example.pt (anubis04.example.pt) [<IPAddress>]:11970 X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no F=<******@example.pt> rejected RCPT <******@******>: SPF: <IPAddress> is not allowed to send mail from example.pt
SPF record for example.pt:
v=spf1 a:smtp1.example.pt a:smtp2.example.pt a:smtp3.example.pt a:smtp4.example.pt a:smtp5.example.pt a:newsletter.example.pt include:spf.protection.outlook.com -all
Sender IP address matches the SPF record:
smtp1.example.pt. 21600 IN A <IPAddress>
How can I tweak / fix this? Is this check some external call?
Thanks,
PM
Last edited by a moderator: