intentsignal 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- intentsignal-0.1.0/.gitignore +3 -0
- intentsignal-0.1.0/LICENSE +21 -0
- intentsignal-0.1.0/PKG-INFO +88 -0
- intentsignal-0.1.0/README.md +66 -0
- intentsignal-0.1.0/pyproject.toml +35 -0
- intentsignal-0.1.0/src/intentsignal/__init__.py +5 -0
- intentsignal-0.1.0/src/intentsignal/cli.py +72 -0
- intentsignal-0.1.0/src/intentsignal/client.py +45 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 IntentSignal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: intentsignal
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Check a domain's email setup from the command line: MX, SPF, DKIM, DMARC and blacklists, plus reverse IP lookup. By IntentSignal, a cold email agency.
|
|
5
|
+
Project-URL: Homepage, https://intentsignal.ai
|
|
6
|
+
Project-URL: MX record checker, https://intentsignal.ai/tools/mx-record-checker
|
|
7
|
+
Project-URL: Email blacklist check, https://intentsignal.ai/tools/email-blacklist-check
|
|
8
|
+
Project-URL: Reverse IP lookup, https://intentsignal.ai/tools/reverse-ip-lookup
|
|
9
|
+
Project-URL: For AI agents, https://intentsignal.ai/for-agents
|
|
10
|
+
Author: IntentSignal
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: cold email,deliverability,dkim,dmarc,email blacklist,email deliverability,mx record,reverse ip lookup,spf
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Topic :: Communications :: Email
|
|
19
|
+
Classifier: Topic :: Internet :: Name Service (DNS)
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# intentsignal
|
|
24
|
+
|
|
25
|
+
Check a domain's email setup from the command line. One command tells you whether the domain has MX records, SPF, DKIM and DMARC, and whether it is on a blacklist. A second command tells you which company owns an IP address.
|
|
26
|
+
|
|
27
|
+
The package has no dependencies and runs on Python 3.8 or later. The checks run on the same free tools that IntentSignal hosts on its website.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
pip install intentsignal
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Check a domain
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
intentsignal check yourcompany.com
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The output lists each check with PASS, WARN, FAIL or INFO and a one-line explanation. A domain that fails SPF or DMARC will have trouble reaching the inbox, so fix those first.
|
|
42
|
+
|
|
43
|
+
To see only one part of the result:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
intentsignal mx yourcompany.com
|
|
47
|
+
intentsignal blacklist yourcompany.com
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Look up an IP address
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
intentsignal ip 8.8.8.8
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This prints the organization, network, hostname and location behind the address. The free lookup allows a limited number of requests per day.
|
|
57
|
+
|
|
58
|
+
## Use it in Python
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from intentsignal import check_domain, reverse_ip
|
|
62
|
+
|
|
63
|
+
result = check_domain("yourcompany.com")
|
|
64
|
+
for c in result["checks"]:
|
|
65
|
+
print(c["label"], c["status"], c["detail"])
|
|
66
|
+
|
|
67
|
+
print(reverse_ip("8.8.8.8")["organization"])
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Add `--json` before the command to get the raw result, for example `intentsignal --json check yourcompany.com`.
|
|
71
|
+
|
|
72
|
+
## A note on Spamhaus
|
|
73
|
+
|
|
74
|
+
Spamhaus does not answer lookups from public DNS services, so the tool cannot check it for you. The result includes a link to check the domain on the Spamhaus site.
|
|
75
|
+
|
|
76
|
+
## Web versions
|
|
77
|
+
|
|
78
|
+
- MX record checker: https://intentsignal.ai/tools/mx-record-checker
|
|
79
|
+
- Email blacklist check: https://intentsignal.ai/tools/email-blacklist-check
|
|
80
|
+
- Reverse IP lookup: https://intentsignal.ai/tools/reverse-ip-lookup
|
|
81
|
+
|
|
82
|
+
## About
|
|
83
|
+
|
|
84
|
+
This package is maintained by IntentSignal, a cold email agency for B2B companies. Our team writes to a prospect when there is a reason to: a new executive starts, a rival raises prices or has an outage, or the CEO talks about the problem on an earnings call. Each client also gets signals built for its market. One example is Upside, which hears about new restaurants on their opening day because a bot scans local papers each morning. See https://intentsignal.ai for more.
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# intentsignal
|
|
2
|
+
|
|
3
|
+
Check a domain's email setup from the command line. One command tells you whether the domain has MX records, SPF, DKIM and DMARC, and whether it is on a blacklist. A second command tells you which company owns an IP address.
|
|
4
|
+
|
|
5
|
+
The package has no dependencies and runs on Python 3.8 or later. The checks run on the same free tools that IntentSignal hosts on its website.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
pip install intentsignal
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Check a domain
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
intentsignal check yourcompany.com
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The output lists each check with PASS, WARN, FAIL or INFO and a one-line explanation. A domain that fails SPF or DMARC will have trouble reaching the inbox, so fix those first.
|
|
20
|
+
|
|
21
|
+
To see only one part of the result:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
intentsignal mx yourcompany.com
|
|
25
|
+
intentsignal blacklist yourcompany.com
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Look up an IP address
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
intentsignal ip 8.8.8.8
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This prints the organization, network, hostname and location behind the address. The free lookup allows a limited number of requests per day.
|
|
35
|
+
|
|
36
|
+
## Use it in Python
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from intentsignal import check_domain, reverse_ip
|
|
40
|
+
|
|
41
|
+
result = check_domain("yourcompany.com")
|
|
42
|
+
for c in result["checks"]:
|
|
43
|
+
print(c["label"], c["status"], c["detail"])
|
|
44
|
+
|
|
45
|
+
print(reverse_ip("8.8.8.8")["organization"])
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Add `--json` before the command to get the raw result, for example `intentsignal --json check yourcompany.com`.
|
|
49
|
+
|
|
50
|
+
## A note on Spamhaus
|
|
51
|
+
|
|
52
|
+
Spamhaus does not answer lookups from public DNS services, so the tool cannot check it for you. The result includes a link to check the domain on the Spamhaus site.
|
|
53
|
+
|
|
54
|
+
## Web versions
|
|
55
|
+
|
|
56
|
+
- MX record checker: https://intentsignal.ai/tools/mx-record-checker
|
|
57
|
+
- Email blacklist check: https://intentsignal.ai/tools/email-blacklist-check
|
|
58
|
+
- Reverse IP lookup: https://intentsignal.ai/tools/reverse-ip-lookup
|
|
59
|
+
|
|
60
|
+
## About
|
|
61
|
+
|
|
62
|
+
This package is maintained by IntentSignal, a cold email agency for B2B companies. Our team writes to a prospect when there is a reason to: a new executive starts, a rival raises prices or has an outage, or the CEO talks about the problem on an earnings call. Each client also gets signals built for its market. One example is Upside, which hears about new restaurants on their opening day because a bot scans local papers each morning. See https://intentsignal.ai for more.
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "intentsignal"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Check a domain's email setup from the command line: MX, SPF, DKIM, DMARC and blacklists, plus reverse IP lookup. By IntentSignal, a cold email agency."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "IntentSignal" }]
|
|
13
|
+
keywords = ["email deliverability", "mx record", "spf", "dkim", "dmarc", "email blacklist", "reverse ip lookup", "cold email", "deliverability"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Topic :: Communications :: Email",
|
|
20
|
+
"Topic :: Internet :: Name Service (DNS)",
|
|
21
|
+
]
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://intentsignal.ai"
|
|
26
|
+
"MX record checker" = "https://intentsignal.ai/tools/mx-record-checker"
|
|
27
|
+
"Email blacklist check" = "https://intentsignal.ai/tools/email-blacklist-check"
|
|
28
|
+
"Reverse IP lookup" = "https://intentsignal.ai/tools/reverse-ip-lookup"
|
|
29
|
+
"For AI agents" = "https://intentsignal.ai/for-agents"
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
intentsignal = "intentsignal.cli:main"
|
|
33
|
+
|
|
34
|
+
[tool.hatch.build.targets.wheel]
|
|
35
|
+
packages = ["src/intentsignal"]
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Command line interface: intentsignal check|mx|blacklist|ip <target>."""
|
|
2
|
+
import argparse
|
|
3
|
+
import json
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from . import __version__
|
|
7
|
+
from .client import IntentSignalError, check_domain, reverse_ip
|
|
8
|
+
|
|
9
|
+
MARK = {"pass": "PASS", "warn": "WARN", "fail": "FAIL", "info": "INFO"}
|
|
10
|
+
BLACKLIST_KEYS = {"surbl", "spamhaus", "ips"}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _print_checks(result, keep=None):
|
|
14
|
+
print(f"{result.get('domain')}")
|
|
15
|
+
for c in result.get("checks", []):
|
|
16
|
+
key = c.get("key", "")
|
|
17
|
+
if keep and not keep(key):
|
|
18
|
+
continue
|
|
19
|
+
print(f" [{MARK.get(c.get('status'), '?'):4}] {c.get('label')}: {c.get('detail')}")
|
|
20
|
+
if c.get("fix") and c.get("status") in ("fail", "warn"):
|
|
21
|
+
print(f" Fix: {c['fix']}")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main(argv=None):
|
|
25
|
+
p = argparse.ArgumentParser(
|
|
26
|
+
prog="intentsignal",
|
|
27
|
+
description="Check a domain's email setup or look up an IP. Free tools from IntentSignal: https://intentsignal.ai",
|
|
28
|
+
)
|
|
29
|
+
p.add_argument("--version", action="version", version=f"intentsignal {__version__}")
|
|
30
|
+
p.add_argument("--json", action="store_true", help="print the raw JSON result")
|
|
31
|
+
sub = p.add_subparsers(dest="cmd", required=True)
|
|
32
|
+
for name, helptext in (
|
|
33
|
+
("check", "run every check: MX, SPF, DKIM, DMARC and blacklists"),
|
|
34
|
+
("mx", "show the MX records only"),
|
|
35
|
+
("blacklist", "show the blacklist results only"),
|
|
36
|
+
):
|
|
37
|
+
s = sub.add_parser(name, help=helptext)
|
|
38
|
+
s.add_argument("domain")
|
|
39
|
+
s = sub.add_parser("ip", help="reverse IP lookup: who owns an IP address")
|
|
40
|
+
s.add_argument("ip")
|
|
41
|
+
a = p.parse_args(argv)
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
if a.cmd == "ip":
|
|
45
|
+
r = reverse_ip(a.ip)
|
|
46
|
+
if a.json:
|
|
47
|
+
print(json.dumps(r, indent=2))
|
|
48
|
+
else:
|
|
49
|
+
for k in ("ip", "organization", "domain", "network", "asn", "hostname", "city", "region", "country", "type"):
|
|
50
|
+
if r.get(k):
|
|
51
|
+
print(f"{k:13} {r[k]}")
|
|
52
|
+
return 0
|
|
53
|
+
r = check_domain(a.domain)
|
|
54
|
+
if a.json:
|
|
55
|
+
print(json.dumps(r, indent=2))
|
|
56
|
+
elif a.cmd == "mx":
|
|
57
|
+
_print_checks(r, lambda k: k == "mx")
|
|
58
|
+
elif a.cmd == "blacklist":
|
|
59
|
+
_print_checks(r, lambda k: k in BLACKLIST_KEYS)
|
|
60
|
+
else:
|
|
61
|
+
_print_checks(r)
|
|
62
|
+
s = r.get("score", {})
|
|
63
|
+
print(f"\n {s.get('pass', 0)} passed, {s.get('warn', 0)} warnings, {s.get('fail', 0)} failed")
|
|
64
|
+
print("\nWeb version: https://intentsignal.ai/tools/email-blacklist-check", file=sys.stderr)
|
|
65
|
+
return 0
|
|
66
|
+
except IntentSignalError as e:
|
|
67
|
+
print(f"error: {e}", file=sys.stderr)
|
|
68
|
+
return 1
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
if __name__ == "__main__":
|
|
72
|
+
sys.exit(main())
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Small client for the free IntentSignal tools. Standard library only."""
|
|
2
|
+
import json
|
|
3
|
+
import urllib.error
|
|
4
|
+
import urllib.parse
|
|
5
|
+
import urllib.request
|
|
6
|
+
|
|
7
|
+
BASE = "https://afkqpakndnjewsydrfav.supabase.co/functions/v1"
|
|
8
|
+
UA = "intentsignal-python/0.1.0"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class IntentSignalError(Exception):
|
|
12
|
+
"""Raised when a lookup fails or the input is rejected."""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get(path, **params):
|
|
16
|
+
url = f"{BASE}/{path}?{urllib.parse.urlencode(params)}"
|
|
17
|
+
req = urllib.request.Request(url, headers={"User-Agent": UA, "Accept": "application/json"})
|
|
18
|
+
try:
|
|
19
|
+
with urllib.request.urlopen(req, timeout=30) as r:
|
|
20
|
+
data = json.loads(r.read().decode("utf-8"))
|
|
21
|
+
except urllib.error.HTTPError as e:
|
|
22
|
+
try:
|
|
23
|
+
msg = json.loads(e.read().decode("utf-8")).get("error", str(e))
|
|
24
|
+
except Exception:
|
|
25
|
+
msg = str(e)
|
|
26
|
+
raise IntentSignalError(msg) from None
|
|
27
|
+
except urllib.error.URLError as e:
|
|
28
|
+
raise IntentSignalError(f"network error: {e.reason}") from None
|
|
29
|
+
if isinstance(data, dict) and data.get("error"):
|
|
30
|
+
raise IntentSignalError(data["error"])
|
|
31
|
+
return data
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def check_domain(domain):
|
|
35
|
+
"""Check MX, SPF, DKIM, DMARC, SURBL and IP blacklists for a domain.
|
|
36
|
+
|
|
37
|
+
Returns a dict with "domain", "score" and a list of "checks", each with
|
|
38
|
+
"key", "label", "status" (pass, warn, fail or info) and "detail".
|
|
39
|
+
"""
|
|
40
|
+
return _get("domain-health", domain=domain.strip().lower())
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def reverse_ip(ip):
|
|
44
|
+
"""Look up the organization, network and location behind an IP address."""
|
|
45
|
+
return _get("reverse-ip", ip=ip.strip())
|