bug-mailfromd


Search for: Advanced

[Bug-mailfromd] resolve()


Hi Sergey and list members,

I'm finding that in mailfromd 8.4 match_dnsbl() is returning false in cases where it should be true.

Currently 190.128.7.143 is listed in Spamhaus XBL.

$ dig +short 143.7.128.190.xbl.spamhaus.org a
127.0.0.4

Looking at match_dnsbl.mf resolve() is always returning "0", so match_dnsbl() returns 0 and never reaches match_cidr().

I tested this script:
printf('resolve = %s', resolve("143.7.128.190", "xbl.spamhaus.org"))

Output:
resolve = 0


The BIND query log shows PTR record lookups, not A records.

22-Mar-2018 14:31:44.674 info: client @0x7f7b700c8510 127.0.0.1#42553 (143.7.128.190.xbl.spamhaus.org): query: 143.7.128.190.xbl.spamhaus.org IN PTR + (127.0.0.1)


In an older version of mailfromd (5.2) it returns the expected value and BIND query logs show lookups for ANY records.

printf('resolve = %s', resolve("143.7.128.190", "xbl.spamhaus.org"))

resolve = 127.0.0.4