{"id":23165922,"url":"https://github.com/ndejong/domain-email-records","last_synced_at":"2025-08-18T05:31:57.222Z","repository":{"id":44096745,"uuid":"511916770","full_name":"ndejong/domain-email-records","owner":"ndejong","description":"CLI tool to quickly lookup MX, SPF, DMARC records for many domains","archived":false,"fork":false,"pushed_at":"2023-10-20T11:41:48.000Z","size":60,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-06T18:52:02.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/domain-email-records","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndejong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-08T14:06:15.000Z","updated_at":"2023-10-20T11:45:16.000Z","dependencies_parsed_at":"2022-09-26T21:21:53.301Z","dependency_job_id":null,"html_url":"https://github.com/ndejong/domain-email-records","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fdomain-email-records","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fdomain-email-records/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fdomain-email-records/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fdomain-email-records/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndejong","download_url":"https://codeload.github.com/ndejong/domain-email-records/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230204032,"owners_count":18189711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-18T01:29:59.414Z","updated_at":"2024-12-18T01:30:00.012Z","avatar_url":"https://github.com/ndejong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# domain-email-records\n[![PyPi](https://img.shields.io/pypi/v/domain-email-records.svg)](https://pypi.python.org/pypi/domain-email-records/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/domain-email-records.svg)](https://github.com/ndejong/domain-email-records/)\n[![Build Tests](https://github.com/ndejong/domain-email-records/actions/workflows/build-tests.yml/badge.svg)](https://github.com/ndejong/domain-email-records/actions/workflows/build-tests.yml)\n![License](https://img.shields.io/github/license/ndejong/domain-email-records.svg)\n\nCLI tool to quickly lookup MX, SPF, DMARC records for many domains\n\n__NB1__ this tool can generate several-hundred DNS queries per second, be sure your \nnameservers have capacity to handle this.\n\n__NB2__ if you get errors like `OSError: [Errno 24] Too many open files: '/etc/resolv.conf'` then \nyou are trying to set the chunk-size too large for your system - use a smaller chunk-size.\n\n## Install\n```shell\npip install [--upgrade] domain-email-records\n```\n\n## Usage\n```shell\nusage: domain-email-records [-h] [-q | -v] [-o \u003cfilename\u003e] [-T \u003cseconds\u003e] [-n [\u003caddress\u003e ...]] [-t [\u003cqtype\u003e ...]] [-c \u003csize\u003e] [-d [\u003cdomain\u003e ...]] [-f \u003cfilename\u003e] [-col \u003ccol\u003e]\n\ndomain-email-records v0.4.1\n\nCLI tool to quickly lookup MX, SPF, DMARC records for many domains\n\noptions:\n  -h, --help            show this help message and exit\n  -q, --quiet           Set quiet logging output\n  -v, --verbose         Set verbose logging output\n  -o \u003cfilename\u003e, --out \u003cfilename\u003e\n                        Filename to save JSON formatted output to (default: stdout)\n  -T \u003cseconds\u003e, --timeout \u003cseconds\u003e\n                        Timeout seconds per domain-record query (default: 10)\n  -n [\u003caddress\u003e ...], --nameservers [\u003caddress\u003e ...]\n                        Space separated list of alternate nameservers (default: system nameservers)\n  -t [\u003cqtype\u003e ...], --types [\u003cqtype\u003e ...]\n                        Space separated list lookup types to collect (default: ['ns', 'apex', 'mx', 'spf', 'dmarc']); also 'txt' type is available\n  -c \u003csize\u003e, --chunk \u003csize\u003e\n                        Chunk size per async loop to resolve together (default: 500)\n\ndomains-by-cli:\n  -d [\u003cdomain\u003e ...], --domains [\u003cdomain\u003e ...]\n                        Space separated list of domain names to query\n\ndomains-by-file:\n  -f \u003cfilename\u003e, --filename \u003cfilename\u003e\n                        Filename with list of domains to use; plain list text file -or- a comma-separated CSV file list.\n  -col \u003ccol\u003e, --csv-column \u003ccol\u003e\n                        CSV column number to use for domain-names -if- the file is CSV formatted (default: 2)\n```\n\n## Examples\n\n### Domains from CSV-file with output file\n```shell\n$ domain-email-records -c 1000 -f alexa-top-1m-20220708.csv -o /tmp/output.json\n2022-07-09T16:51:41+1000 - INFO - Looking up 772475 domains in chunks of 1000 per async loop using system-local nameservers.\n2022-07-09T16:51:56+1000 - INFO - Domains in list from:google.com (index:0) to:icims.com (index:1000) query rate ~15.5ms per domain (5.2ms per query) ETA: 2022-07-09T20:11:09+1000\n2022-07-09T16:52:11+1000 - INFO - Domains in list from:aliyuncs.com (index:1000) to:rapidgator.net (index:2000) query rate ~15.1ms per domain (5.0ms per query) ETA: 2022-07-09T20:08:23+1000\n2022-07-09T16:52:27+1000 - INFO - Domains in list from:hola.org (index:2000) to:shaadi.com (index:3000) query rate ~15.4ms per domain (5.1ms per query) ETA: 2022-07-09T20:08:58+1000\n^C2022-07-09T16:52:27+1000 - WARNING - Exiting...\n```\n\n### Domains from plain-file with specific nameservers\n```shell\n$ domain-email-records -n 9.9.9.9 1.1.1.1 8.8.8.8 -f alexa-top-1m-20220708.txt -o /tmp/output.json\n2022-07-09T07:34:08+0000 - INFO - Looking up 772475 domains in chunks of 500 per async loop using ['1.1.1.1', '9.9.9.9', '8.8.8.8'] nameservers.\n2022-07-09T07:34:18+0000 - INFO - Domains in list from:google.com (index:0) to:googlesyndication.com (index:500) query rate ~18.3ms per domain (6.1ms per query) ETA: 2022-07-09T11:30:18+0000\n2022-07-09T07:34:20+0000 - WARNING - cisco.com unable to UTF-8 decode rdata: b'\\xc8atlassian-domain-verification=blI4HshP3kJO1PV8nZFlncJ6TwVviYYxBNhkMi9wIa9DTxUjY4p1GO7O5SjiioyT'\n2022-07-09T07:34:24+0000 - INFO - Domains in list from:chegg.com (index:500) to:icims.com (index:1000) query rate ~12.4ms per domain (4.1ms per query) ETA: 2022-07-09T10:51:50+0000\n2022-07-09T07:34:32+0000 - INFO - Domains in list from:aliyuncs.com (index:1000) to:poshukach.com (index:1500) query rate ~15.3ms per domain (5.1ms per query) ETA: 2022-07-09T10:51:43+0000\n^C2022-07-09T07:35:10+0000 - WARNING - Exiting...\n```\n\n### Domains from cli args with output to file\n```shell\n$ domain-email-records -d google.com facebook.com apple.com amazon.com -o /tmp/output.json\n2022-07-09T14:24:57+1000 - INFO - Domains in list from:google.com to:amazon.com queried (4x) at approx 121.1ms per domain (40.4ms per query) ETA: 2022-07-09 14:24:00\n```\n\n### Domains from cli args with output to stdout\n```\n$ domain-email-records -d google.com facebook.com apple.com amazon.com\n2022-10-06T09:37:38+1000 - INFO - Looking up 4 domains in chunks of 500 per async loop using system-local nameservers.\n{\n  \"google.com\": {\n    \"ns\": [\n      \"ns2.google.com.\",\n      \"ns4.google.com.\",\n      \"ns1.google.com.\",\n      \"ns3.google.com.\"\n    ],\n    \"apex\": [\n      \"142.250.204.14\"\n    ],\n    \"mx\": [\n      \"smtp.google.com.\"\n    ],\n    \"mx_preference\": [\n      \"10\"\n    ],\n    \"spf\": [\n      \"v=spf1 include:_spf.google.com ~all\"\n    ],\n    \"dmarc\": [\n      \"v=DMARC1; p=reject; rua=mailto:mailauth-reports@google.com\"\n    ]\n  }\n}\n...\n2022-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+1000\n```\n\n---\n\nCopyright \u0026copy; 2022 Nicholas de Jong\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndejong%2Fdomain-email-records","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndejong%2Fdomain-email-records","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndejong%2Fdomain-email-records/lists"}