sysinfo: add interface to get IPv6 address

This commit is contained in:
Girish Ramakrishnan
2022-01-05 18:07:36 -08:00
parent 235d18cbb1
commit bbf1a5af3d
13 changed files with 100 additions and 32 deletions

View File

@@ -356,7 +356,7 @@ async function checkMx(domain, mailFqdn) {
const [error2, mxIps] = await safe(dns.promises.resolve(mxRecords[0].exchange, 'A', DNS_OPTIONS));
if (error2 || mxIps.length !== 1) return mx;
const [error3, ip] = await safe(sysinfo.getServerIp());
const [error3, ip] = await safe(sysinfo.getServerIPv4());
if (error3) return mx;
mx.status = mxIps[0] === ip;
@@ -414,7 +414,7 @@ async function checkPtr(mailFqdn) {
errorMessage: ''
};
const [error, ip] = await safe(sysinfo.getServerIp());
const [error, ip] = await safe(sysinfo.getServerIPv4());
if (error) {
ptr.errorMessage = error.message;
return ptr;
@@ -499,7 +499,7 @@ const RBL_LIST = [
// this function currently only looks for black lists based on IP. TODO: also look up by domain
async function checkRblStatus(domain) {
const ip = await sysinfo.getServerIp();
const ip = await sysinfo.getServerIPv4();
const flippedIp = ip.split('.').reverse().join('.');