sysinfo: add interface to get IPv6 address
This commit is contained in:
@@ -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('.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user