Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'No MX for your FROM address');
}
connection.logdebug(plugin, domain + ': A/AAAA => ' + addresses);
let records = {};
for (let i=0; i < addresses.length; i++) {
const addr = addresses[i];
// Ignore anything obviously bogus
if (net.isIPv4(addr)){
if (plugin.re_bogus_ip.test(addr)) {
connection.logdebug(plugin, domain + ': discarding ' + addr);
continue;
}
}
if (net.isIPv6(addr)){
if (net_utils.ipv6_bogus(addr)) {
connection.logdebug(plugin, domain + ': discarding ' + addr);
continue;
}
}
records[addr] = true;
}
records = Object.keys(records);
if (records && records.length) {
txn.results.add(plugin, {pass: 'implicit_mx'});
return mxDone();
}
txn.results.add(plugin, {fail: 'implicit_mx('+domain+')'});
return mxDone();
});
check_results();
return;
}
connection.logdebug(plugin, domain + ': MX ' + addr.priority +
' ' + addr.exchange + ' => ' + addresses2);
for (let i=0; i < addresses2.length; i++) {
// Ignore anything obviously bogus
if (net.isIPv4(addresses2[i])){
if (plugin.re_bogus_ip.test(addresses2[i])) {
connection.logdebug(plugin, addr.exchange +
': discarding ' + addresses2[i]);
continue;
}
}
if (net.isIPv6(addresses2[i])){
if (net_utils.ipv6_bogus(addresses2[i])) {
connection.logdebug(plugin, addr.exchange +
': discarding ' + addresses2[i]);
continue;
}
}
records[addresses2[i]] = 1;
}
check_results();
});
});