bug-mailfromd
[Bug-mailfromd] SPF status fails with CIDR notation A records
Hello,
>From what I can see, if the SPF record has an A record with CIDR notation, mailfromd gives a status of fail even though the ip number is within that range.
Example DNS Records
testspf.activecom.net TXT "v=spf1 a:06.spf.whmpanels.com/24 -all"
06.spf.whmpanels.com A 86.105.214.10
Expectation is to pass for ip numbers in range 86.105.214.0/24 http://www.open-spf.org/SPF_Record_Syntax/#a
# mailfromd --test mail_addr=test@xxxxxxxxxxxxxxxxxxxxx client_addr=86.105.214.197 --debug='spf.trace6'
mailfromd: check_host(86.105.214.197, testspf.activecom.net, test@xxxxxxxxxxxxxxxxxxxxx)
mailfromd: SPF record: v=spf1 a:06.spf.whmpanels.com/24 -all
mailfromd: Parsing SPF record: v=spf1 a:06.spf.whmpanels.com/24 -all
mailfromd: Evaluating SPF record
mailfromd: SPF TERM: a:06.spf.whmpanels.com/24
mailfromd: A domain_spec=06.spf.whmpanels.com, netmask=ffffff00
mailfromd: A: s_addr=5669d600
mailfromd: A does not match
mailfromd: term did not match
mailfromd: SPF TERM: -all
mailfromd: term matched
mailfromd: result = Fail
mailfromd: check_host(86.105.214.197, testspf.activecom.net, test@xxxxxxxxxxxxxxxxxxxxx) = Fail;
SPF check_host(86.105.214.197, testspf.activecom.net, test@xxxxxxxxxxxxxxxxxxxxx) = Fail; matching mechanism "-all"
--
Mehmet Tolga Avcioglu