mlocati / spf-lib

PHP library to parse, build and validate SPF (Sender Policy Framework) DNS records

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doubt whether the condition is correct

mariuszkrzaczkowski opened this issue · comments

I doubt whether this condition is properly built.

spf-lib/src/Checker.php

Lines 115 to 116 in 793f336

$heloDomain = $environment->getHeloDomain();
if ($heloDomain === '' || strcasecmp($heloDomain, $environment->getMailFromDomain()) !== 0) {

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