mailintel 0.2.1 → 0.2.2
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.
- package/README.md +15 -29
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,46 +141,32 @@ mailintel ahmed@atef.dev --json # machine-readable JSON
|
|
|
141
141
|
|
|
142
142
|
## How it works
|
|
143
143
|
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
D -->|miss| E["🌐 DNS MX lookup<br/>cloudflare-dns.com or dns.google"]
|
|
158
|
-
|
|
159
|
-
E --> F{User MX override?}
|
|
160
|
-
F -->|hit| Z4(["return — confidence: high, source: mx-lookup"])
|
|
161
|
-
F -->|miss| G{"Known MX pattern?<br/>*.google.com, *.zoho.com<br/>~30 built-in"}
|
|
162
|
-
|
|
163
|
-
G -->|hit| H["Get provider settings<br/>apply regional variant if needed"]
|
|
164
|
-
G -->|miss| I["🌐 Thunderbird ISPDB<br/>autoconfig.thunderbird.net"]
|
|
165
|
-
|
|
166
|
-
H --> J(["return — confidence: high, source: mx-lookup"])
|
|
167
|
-
I -->|found| K(["return — confidence: medium, source: mx-lookup"])
|
|
168
|
-
I -->|not found| L(["return — connection: null, confidence: low"])
|
|
169
|
-
|
|
170
|
-
class E,I external
|
|
144
|
+
```
|
|
145
|
+
input
|
|
146
|
+
└── check cache
|
|
147
|
+
├── hit → return cached result
|
|
148
|
+
└── miss
|
|
149
|
+
├── user domain override? → return (confidence: high, source: override)
|
|
150
|
+
├── known domain? → return (confidence: high, source: known-domain)
|
|
151
|
+
└── DNS MX lookup [network]
|
|
152
|
+
├── user MX override? → return (confidence: high, source: mx-lookup)
|
|
153
|
+
├── known MX pattern? → return (confidence: high, source: mx-lookup)
|
|
154
|
+
└── Thunderbird ISPDB [network]
|
|
155
|
+
├── found → return (confidence: medium, source: mx-lookup)
|
|
156
|
+
└── not found → return connection: null (confidence: low)
|
|
171
157
|
```
|
|
172
158
|
|
|
173
159
|
At most 2 HTTP requests per uncached lookup - one DNS query and one ISPDB fetch. Known domains resolve instantly with zero network calls.
|
|
174
160
|
|
|
175
161
|
### How it gets the data
|
|
176
162
|
|
|
177
|
-
Every email domain has **MX records** in DNS that say which mail server handles its email.
|
|
163
|
+
Every email domain has **MX records** in DNS that say which mail server handles its email. A Google Workspace domain points to `smtp.google.com`, another might point to `mx.zoho.com` (Zoho).
|
|
178
164
|
|
|
179
165
|
Mailintel queries these using **DNS-over-HTTPS** - plain HTTPS requests to public DNS resolvers, not system-level DNS calls. Works in serverless functions, edge runtimes, and anywhere `fetch` is available. No native modules, no UDP sockets, no special permissions.
|
|
180
166
|
|
|
181
167
|
| Service | URL | What it returns |
|
|
182
168
|
|---------|-----|-----------------|
|
|
183
|
-
| **Cloudflare DNS** (default) | `cloudflare-dns.com/dns-query?name=
|
|
169
|
+
| **Cloudflare DNS** (default) | `cloudflare-dns.com/dns-query?name=example.com&type=MX` * | MX records - which mail server handles the domain |
|
|
184
170
|
| **Google DNS** (alternative) | `dns.google/resolve?name=atef.dev&type=MX` | Same MX records, different resolver |
|
|
185
171
|
| **Thunderbird ISPDB** (fallback) | `autoconfig.thunderbird.net/v1.1/{domain}` | IMAP/SMTP settings from Mozilla's open database |
|
|
186
172
|
|
package/dist/cli.js
CHANGED
|
@@ -692,7 +692,7 @@ function formatResult(result) {
|
|
|
692
692
|
async function main() {
|
|
693
693
|
const args = parseArgs(process.argv.slice(2));
|
|
694
694
|
if (args.version) {
|
|
695
|
-
process.stdout.write("0.2.
|
|
695
|
+
process.stdout.write("0.2.2\n");
|
|
696
696
|
return;
|
|
697
697
|
}
|
|
698
698
|
if (args.help || args.emails.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailintel",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Email domain intelligence. Takes any email address, resolves the provider, returns IMAP/SMTP connection settings. Supports custom domains via MX lookups.",
|
|
5
5
|
"author": "Ahmed Atef <ahmed@atef.dev>",
|
|
6
6
|
"license": "MIT",
|