Package: domain-email-records
domain-email-recordsCLI tool to quickly lookup MX, SPF, DMARC records for many domainsNB1this tool can generate several-hundred DNS queries per second, be sure your
nameservers have capacity to handle this.NB2if you get errors likeOSError: [Errno 24] Too many open files: '/etc/resolv.conf'then
you are trying to set the chunk-size too large for your system - use a smaller chunk-size.Installpipinstall[--upgrade]domain-email-recordsUsageusage:domain-email-records[-h][-q|-v][-o<filename>][-T<seconds>][-n[<address>...]][-t[<qtype>...]][-c<size>][-d[<domain>...]][-f<filename>][-col<col>]domain-email-recordsv0.4.1

CLItooltoquicklylookupMX,SPF,DMARCrecordsformanydomains

options:-h,--helpshowthishelpmessageandexit-q,--quietSetquietloggingoutput-v,--verboseSetverboseloggingoutput-o<filename>,--out<filename>FilenametosaveJSONformattedoutputto(default:stdout)-T<seconds>,--timeout<seconds>Timeoutsecondsperdomain-recordquery(default:10)-n[<address>...],--nameservers[<address>...]Spaceseparatedlistofalternatenameservers(default:systemnameservers)-t[<qtype>...],--types[<qtype>...]Spaceseparatedlistlookuptypestocollect(default:['ns','apex','mx','spf','dmarc']);also'txt'typeisavailable-c<size>,--chunk<size>Chunksizeperasynclooptoresolvetogether(default:500)domains-by-cli:-d[<domain>...],--domains[<domain>...]Spaceseparatedlistofdomainnamestoquery

domains-by-file:-f<filename>,--filename<filename>Filenamewithlistofdomainstouse;plainlisttextfile-or-acomma-separatedCSVfilelist.-col<col>,--csv-column<col>CSVcolumnnumbertousefordomain-names-if-thefileisCSVformatted(default:2)ExamplesDomains from CSV-file with output file$domain-email-records-c1000-falexa-top-1m-20220708.csv-o/tmp/output.json2022-07-09T16:51:41+1000-INFO-Lookingup772475domainsinchunksof1000perasyncloopusingsystem-localnameservers.2022-07-09T16:51:56+1000-INFO-Domainsinlistfrom:google.com(index:0)to:icims.com(index:1000)queryrate~15.5msperdomain(5.2msperquery)ETA:2022-07-09T20:11:09+10002022-07-09T16:52:11+1000-INFO-Domainsinlistfrom:aliyuncs.com(index:1000)to:rapidgator.net(index:2000)queryrate~15.1msperdomain(5.0msperquery)ETA:2022-07-09T20:08:23+10002022-07-09T16:52:27+1000-INFO-Domainsinlistfrom:hola.org(index:2000)to:shaadi.com(index:3000)queryrate~15.4msperdomain(5.1msperquery)ETA:2022-07-09T20:08:58+1000
^C2022-07-09T16:52:27+1000-WARNING-Exiting...Domains from plain-file with specific nameservers$domain-email-records-n9.9.9.91.1.1.18.8.8.8-falexa-top-1m-20220708.txt-o/tmp/output.json2022-07-09T07:34:08+0000-INFO-Lookingup772475domainsinchunksof500perasyncloopusing['1.1.1.1','9.9.9.9','8.8.8.8']nameservers.2022-07-09T07:34:18+0000-INFO-Domainsinlistfrom:google.com(index:0)to:googlesyndication.com(index:500)queryrate~18.3msperdomain(6.1msperquery)ETA:2022-07-09T11:30:18+00002022-07-09T07:34:20+0000-WARNING-cisco.comunabletoUTF-8decoderdata:b'\xc8atlassian-domain-verification=blI4HshP3kJO1PV8nZFlncJ6TwVviYYxBNhkMi9wIa9DTxUjY4p1GO7O5SjiioyT'2022-07-09T07:34:24+0000-INFO-Domainsinlistfrom:chegg.com(index:500)to:icims.com(index:1000)queryrate~12.4msperdomain(4.1msperquery)ETA:2022-07-09T10:51:50+00002022-07-09T07:34:32+0000-INFO-Domainsinlistfrom:aliyuncs.com(index:1000)to:poshukach.com(index:1500)queryrate~15.3msperdomain(5.1msperquery)ETA:2022-07-09T10:51:43+0000
^C2022-07-09T07:35:10+0000-WARNING-Exiting...Domains from cli args with output to file$domain-email-records-dgoogle.comfacebook.comapple.comamazon.com-o/tmp/output.json2022-07-09T14:24:57+1000-INFO-Domainsinlistfrom:google.comto:amazon.comqueried(4x)atapprox121.1msperdomain(40.4msperquery)ETA:2022-07-0914:24:00Domains from cli args with output to stdout$ domain-email-records -d google.com facebook.com apple.com amazon.com
2022-10-06T09:37:38+1000 - INFO - Looking up 4 domains in chunks of 500 per async loop using system-local nameservers.
{
  "google.com": {
    "ns": [
      "ns2.google.com.",
      "ns4.google.com.",
      "ns1.google.com.",
      "ns3.google.com."
    ],
    "apex": [
      "142.250.204.14"
    ],
    "mx": [
      "smtp.google.com."
    ],
    "mx_preference": [
      "10"
    ],
    "spf": [
      "v=spf1 include:_spf.google.com ~all"
    ],
    "dmarc": [
      "v=DMARC1; p=reject; rua=mailto:mailauth-reports@google.com"
    ]
  }
}
...
2022-10-06T09:37:38+1000 - INFO - Domains in list from:google.com (index:0) to:amazon.com (index:4) query rate ~21.2ms per domain (2.4ms per query) ETA: 2022-10-06T09:37:38+1000Copyright © 2022 Nicholas de Jong