mlocati / spf-lib

PHP library to parse, build and validate SPF (Sender Policy Framework) DNS records
MIT License
49 stars 6 forks source link

Doubt whether the condition is correct #13

Open mariuszkrzaczkowski opened 3 years ago

mariuszkrzaczkowski commented 3 years ago

I doubt whether this condition is properly built.

https://github.com/mlocati/spf-lib/blob/793f3369367ae26823e8a6fbd88c7d229875f037/src/Checker.php#L115-L116

strcasecmp('s2.yetiforce.com', 'xxyr.com') = -5

'xxyr.com' is a fictional domain

Example:

$environment = new \SPFLib\Check\Environment('54.38.127.118', 's2.yetiforce.com', 'test@xxyr.com');
$checker = new \SPFLib\Checker();
$checkResult = $checker->check($environment);

Gmail: image

https://www.appmaildev.com/en/dkimfile image