Last active
July 3, 2020 07:21
-
-
Save andris9/1f382c7fcd4806b3a506e6aa57aedc29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install zone-mta | |
const bounces = require("zone-mta/lib/bounces"); | |
let str = "550 11.22.33.44 listed at spamhaus, see http://www.spamhaus.org"; | |
let bounceInfo = bounces.check(str); | |
console.log("data : %s", str.replace(/\n/g, "\n" + " ".repeat(11))); | |
Object.keys(bounceInfo || {}).forEach((key) => { | |
console.log("%s %s: %s", key, " ".repeat(8 - key.length), bounceInfo[key]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment