From a7b0ba2178f2f9b809a55269d6beb6cb5e4aa859 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 8 Feb 2018 11:52:43 -0800 Subject: [PATCH] PTR must be resolved by the domain and not IP --- src/mail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mail.js b/src/mail.js index 0ef793192..38674d01d 100644 --- a/src/mail.js +++ b/src/mail.js @@ -292,7 +292,7 @@ function checkPtr(callback) { domain: null, type: 'PTR', value: null, - expected: config.mailFqdn() + '.', + expected: config.mailFqdn(), // any trailing '.' is added by client software (https://lists.gt.net/spf/devel/7918) status: false }; @@ -301,7 +301,7 @@ function checkPtr(callback) { ptr.domain = ip.split('.').reverse().join('.') + '.in-addr.arpa'; - dns.resolve(ip, 'PTR', DNS_OPTIONS, function (error, ptrRecords) { + dns.resolve(ptr.domain, 'PTR', DNS_OPTIONS, function (error, ptrRecords) { if (error) return callback(error, ptr); if (ptrRecords.length !== 0) {