mailintel 0.2.0 → 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.
Files changed (3) hide show
  1. package/README.md +15 -29
  2. package/dist/cli.js +1 -1
  3. package/package.json +4 -2
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
- ```mermaid
145
- flowchart TD
146
- classDef external fill:#dbeafe,stroke:#3b82f6,color:#1e3a5f
147
-
148
- A(["ahmed@atef.dev"]) --> B[Check cache]
149
-
150
- B -->|hit| Z1([return cached result])
151
- B -->|miss| C{User domain override?}
152
-
153
- C -->|hit| Z2(["return confidence: high, source: override"])
154
- C -->|miss| D{"Known domain?<br/>gmail.com, outlook.com<br/>~50 built-in"}
155
-
156
- D -->|hit| Z3(["return — confidence: high, source: known-domain"])
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. `atef.dev` points to `smtp.google.com` (Google Workspace), another domain might point to `mx.zoho.com` (Zoho).
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=atef.dev&type=MX` * | MX records - which mail server handles the domain |
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.0\n");
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.0",
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",
@@ -31,10 +31,12 @@
31
31
  "build": "tsup",
32
32
  "test": "vitest run",
33
33
  "test:watch": "vitest",
34
- "prepublishOnly": "npm run build && npm run test"
34
+ "prepublishOnly": "npm run build && npm run test",
35
+ "release": "release-it"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@types/node": "^20.0.0",
39
+ "release-it": "^19.2.4",
38
40
  "tsup": "^8.0.0",
39
41
  "typescript": "^5.4.0",
40
42
  "vitest": "^2.0.0"