mxroute-cli 0.1.3 → 0.3.0
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 +524 -241
- package/dist/commands/accounts.js +19 -59
- package/dist/commands/accounts.js.map +1 -1
- package/dist/commands/aliases.js +8 -57
- package/dist/commands/aliases.js.map +1 -1
- package/dist/commands/audit.d.ts +1 -0
- package/dist/commands/audit.js +278 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/auth.d.ts +0 -1
- package/dist/commands/auth.js +0 -69
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/autoresponder.js +10 -59
- package/dist/commands/autoresponder.js.map +1 -1
- package/dist/commands/benchmark.d.ts +1 -0
- package/dist/commands/benchmark.js +134 -0
- package/dist/commands/benchmark.js.map +1 -0
- package/dist/commands/bulk.d.ts +2 -0
- package/dist/commands/bulk.js +201 -0
- package/dist/commands/bulk.js.map +1 -0
- package/dist/commands/catchall.js +5 -38
- package/dist/commands/catchall.js.map +1 -1
- package/dist/commands/completions.d.ts +1 -0
- package/dist/commands/completions.js +138 -0
- package/dist/commands/completions.js.map +1 -0
- package/dist/commands/config.d.ts +1 -0
- package/dist/commands/config.js +42 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/cron.d.ts +2 -0
- package/dist/commands/cron.js +114 -0
- package/dist/commands/cron.js.map +1 -0
- package/dist/commands/diff.d.ts +1 -0
- package/dist/commands/diff.js +125 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/dns-setup.d.ts +1 -0
- package/dist/commands/dns-setup.js +256 -0
- package/dist/commands/dns-setup.js.map +1 -0
- package/dist/commands/dns-watch.d.ts +1 -0
- package/dist/commands/dns-watch.js +67 -0
- package/dist/commands/dns-watch.js.map +1 -0
- package/dist/commands/dns.js +28 -6
- package/dist/commands/dns.js.map +1 -1
- package/dist/commands/dnsapi.js +10 -59
- package/dist/commands/dnsapi.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/doctor.js +143 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/domains.js +4 -27
- package/dist/commands/domains.js.map +1 -1
- package/dist/commands/export-import.d.ts +2 -0
- package/dist/commands/export-import.js +189 -0
- package/dist/commands/export-import.js.map +1 -0
- package/dist/commands/filters.js +8 -57
- package/dist/commands/filters.js.map +1 -1
- package/dist/commands/fix.d.ts +1 -0
- package/dist/commands/fix.js +226 -0
- package/dist/commands/fix.js.map +1 -0
- package/dist/commands/forwarders.js +8 -57
- package/dist/commands/forwarders.js.map +1 -1
- package/dist/commands/header-analyze.d.ts +2 -0
- package/dist/commands/header-analyze.js +177 -0
- package/dist/commands/header-analyze.js.map +1 -0
- package/dist/commands/ip.d.ts +1 -0
- package/dist/commands/ip.js +70 -0
- package/dist/commands/ip.js.map +1 -0
- package/dist/commands/lists.js +15 -80
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/migrate.d.ts +1 -0
- package/dist/commands/migrate.js +161 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/monitor.d.ts +4 -0
- package/dist/commands/monitor.js +189 -0
- package/dist/commands/monitor.js.map +1 -0
- package/dist/commands/notify.d.ts +10 -0
- package/dist/commands/notify.js +153 -0
- package/dist/commands/notify.js.map +1 -0
- package/dist/commands/onboard.d.ts +1 -0
- package/dist/commands/onboard.js +220 -0
- package/dist/commands/onboard.js.map +1 -0
- package/dist/commands/open.d.ts +1 -0
- package/dist/commands/open.js +53 -0
- package/dist/commands/open.js.map +1 -0
- package/dist/commands/quota.js +11 -48
- package/dist/commands/quota.js.map +1 -1
- package/dist/commands/report.d.ts +1 -0
- package/dist/commands/report.js +206 -0
- package/dist/commands/report.js.map +1 -0
- package/dist/commands/send.d.ts +1 -0
- package/dist/commands/send.js +43 -1
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/share.d.ts +1 -0
- package/dist/commands/share.js +217 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/spam.js +9 -42
- package/dist/commands/spam.js.map +1 -1
- package/dist/commands/troubleshoot.js.map +1 -1
- package/dist/commands/webhook.d.ts +3 -0
- package/dist/commands/webhook.js +124 -0
- package/dist/commands/webhook.js.map +1 -0
- package/dist/commands/whoami.d.ts +1 -0
- package/dist/commands/whoami.js +40 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/index.js +228 -6
- package/dist/index.js.map +1 -1
- package/dist/mcp.js.map +1 -1
- package/dist/utils/blacklist.d.ts +17 -0
- package/dist/utils/blacklist.js +65 -0
- package/dist/utils/blacklist.js.map +1 -0
- package/dist/utils/directadmin.js +1 -1
- package/dist/utils/directadmin.js.map +1 -1
- package/dist/utils/dns.d.ts +1 -1
- package/dist/utils/dns.js +3 -3
- package/dist/utils/dns.js.map +1 -1
- package/dist/utils/registrars.d.ts +35 -0
- package/dist/utils/registrars.js +324 -0
- package/dist/utils/registrars.js.map +1 -0
- package/dist/utils/shared.d.ts +20 -0
- package/dist/utils/shared.js +64 -0
- package/dist/utils/shared.js.map +1 -0
- package/dist/utils/theme.js +0 -1
- package/dist/utils/theme.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mxroute-cli
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A comprehensive CLI and MCP server for managing [MXroute](https://mxroute.com) email hosting. Full account management, automated DNS configuration, email sending, spam control, security auditing, monitoring, and more -- all from your terminal.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
__ ____ __ _
|
|
@@ -12,65 +12,152 @@ A powerful CLI for managing [MXroute](https://mxroute.com) email hosting -- full
|
|
|
12
12
|
Email Hosting Management CLI
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
[](https://www.npmjs.com/package/mxroute-cli)
|
|
16
|
+
[](LICENSE)
|
|
17
|
+
[](https://github.com/t-rhex/mxroute-cli/actions)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Table of Contents
|
|
22
|
+
|
|
23
|
+
- [Features](#features)
|
|
24
|
+
- [Installation](#installation)
|
|
25
|
+
- [Quick Start](#quick-start)
|
|
26
|
+
- [Credentials](#credentials)
|
|
27
|
+
- [Command Reference](#command-reference)
|
|
28
|
+
- [Core](#core)
|
|
29
|
+
- [Email Management](#email-management)
|
|
30
|
+
- [DNS Management](#dns-management)
|
|
31
|
+
- [Email Sending](#email-sending)
|
|
32
|
+
- [Spam and Security](#spam-and-security)
|
|
33
|
+
- [Monitoring and Operations](#monitoring-and-operations)
|
|
34
|
+
- [Data Management](#data-management)
|
|
35
|
+
- [Troubleshooting](#troubleshooting)
|
|
36
|
+
- [Connection Info](#connection-info)
|
|
37
|
+
- [Configuration](#configuration)
|
|
38
|
+
- [MCP Server](#mcp-server)
|
|
39
|
+
- [Automated DNS Setup](#automated-dns-setup)
|
|
40
|
+
- [Monitoring and Cron](#monitoring-and-cron)
|
|
41
|
+
- [Shell Completions](#shell-completions)
|
|
42
|
+
- [Development](#development)
|
|
43
|
+
- [Requirements](#requirements)
|
|
44
|
+
- [License](#license)
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
15
48
|
## Features
|
|
16
49
|
|
|
17
|
-
- **
|
|
18
|
-
- **DNS
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
50
|
+
- **41 command groups, 100+ subcommands** -- manage every aspect of MXroute from the terminal
|
|
51
|
+
- **Automated DNS setup** -- configure MX, SPF, DKIM, and DMARC records via Cloudflare, Porkbun, DigitalOcean, or Namecheap APIs
|
|
52
|
+
- **MCP server** -- 36 tools exposed via the Model Context Protocol for AI-assisted email management
|
|
53
|
+
- **Security auditing** -- score your domains against DNS, SPF lookup count, catch-all, and forwarding loop checks
|
|
54
|
+
- **Blacklist monitoring** -- check your server IP against 10 DNS blacklists
|
|
55
|
+
- **Health monitoring** -- cron-friendly health checks with alert support
|
|
56
|
+
- **Bulk operations** -- create accounts and forwarders from CSV files
|
|
57
|
+
- **Export/import** -- back up and restore your entire configuration as JSON
|
|
58
|
+
- **Email webhook** -- local HTTP server that relays email through MXroute SMTP
|
|
24
59
|
- **Multi-profile support** -- manage multiple MXroute accounts from one CLI
|
|
25
60
|
- **Secure config** -- credentials stored with `0600` permissions in `~/.config/mxroute-cli/`
|
|
26
61
|
|
|
27
|
-
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
28
65
|
|
|
29
66
|
```bash
|
|
30
67
|
npm install -g mxroute-cli
|
|
31
68
|
```
|
|
32
69
|
|
|
70
|
+
This installs two binaries:
|
|
71
|
+
- `mxroute` -- the CLI
|
|
72
|
+
- `mxroute-mcp` -- the MCP server
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
33
76
|
## Quick Start
|
|
34
77
|
|
|
35
78
|
```bash
|
|
36
|
-
# 1.
|
|
37
|
-
mxroute
|
|
79
|
+
# 1. Run the interactive setup wizard
|
|
80
|
+
mxroute setup
|
|
38
81
|
|
|
39
|
-
#
|
|
40
|
-
mxroute
|
|
82
|
+
# Or configure step by step:
|
|
83
|
+
mxroute config setup # SMTP credentials (for sending email)
|
|
84
|
+
mxroute auth login # DirectAdmin API auth (for account management)
|
|
41
85
|
|
|
42
|
-
#
|
|
86
|
+
# 2. Check your DNS records
|
|
43
87
|
mxroute dns check
|
|
44
88
|
|
|
45
|
-
#
|
|
89
|
+
# 3. View your account dashboard
|
|
46
90
|
mxroute status
|
|
47
91
|
```
|
|
48
92
|
|
|
49
|
-
|
|
93
|
+
**Example -- status dashboard:**
|
|
94
|
+
```
|
|
95
|
+
┌─ Account Status ────────────────────────────────────────┐
|
|
96
|
+
│ Profile default │
|
|
97
|
+
│ Server fusion.mxrouting.net │
|
|
98
|
+
│ Account user@example.com │
|
|
99
|
+
│ │
|
|
100
|
+
│ DNS Health │
|
|
101
|
+
│ MX ✔ SPF ✔ DKIM ✔ DMARC ✔ CNAME ● │
|
|
102
|
+
│ │
|
|
103
|
+
│ SMTP API ✔ Connected │
|
|
104
|
+
└──────────────────────────────────────────────────────────┘
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Credentials
|
|
50
110
|
|
|
51
111
|
The CLI uses two types of credentials:
|
|
52
112
|
|
|
53
113
|
| Credential | Purpose | Where to find |
|
|
54
114
|
|---|---|---|
|
|
55
|
-
| **Server hostname** | Identifies your MXroute server | Control Panel
|
|
56
|
-
| **Email + password** | SMTP API (sending email) | Your email account credentials
|
|
115
|
+
| **Server hostname** | Identifies your MXroute server | Control Panel -> DNS section (e.g., `tuesday`, `fusion`) |
|
|
116
|
+
| **Email + password** | SMTP API (sending email) | Your email account credentials |
|
|
57
117
|
| **DirectAdmin username** | API authentication | Your DirectAdmin login username |
|
|
58
|
-
| **Login Key** | API authentication (recommended
|
|
118
|
+
| **Login Key** | API authentication (recommended) | Control Panel -> Login Keys -> Create new key |
|
|
59
119
|
|
|
60
|
-
> **Why Login Keys?** They
|
|
120
|
+
> **Why Login Keys?** They are more secure than passwords -- you can restrict permissions, set expiry dates, and revoke them without changing your password.
|
|
121
|
+
|
|
122
|
+
**Which commands need which credentials:**
|
|
123
|
+
|
|
124
|
+
| Credential | Required for |
|
|
125
|
+
|---|---|
|
|
126
|
+
| **SMTP credentials** | `send`, `test`, `webhook`, `monitor` |
|
|
127
|
+
| **DirectAdmin Login Key** | `domains`, `accounts`, `forwarders`, `autoresponder`, `catchall`, `spam`, `dnsrecords`, `filters`, `lists`, `aliases`, `quota`, `audit`, `doctor`, `export` |
|
|
128
|
+
| **None** (server name only) | `dns check`, `dns records`, `dns generate`, `info`, `troubleshoot`, `ip` |
|
|
61
129
|
|
|
62
130
|
---
|
|
63
131
|
|
|
64
132
|
## Command Reference
|
|
65
133
|
|
|
66
|
-
###
|
|
134
|
+
### Core
|
|
135
|
+
|
|
136
|
+
| Command | Description |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `mxroute setup` | Interactive setup wizard -- configures CLI, MCP server, and skills |
|
|
139
|
+
| `mxroute status` | Account dashboard with auth status, DNS health, and connectivity |
|
|
140
|
+
| `mxroute whoami` | Quick account overview |
|
|
141
|
+
| `mxroute open [target]` | Open MXroute panels in your browser |
|
|
142
|
+
|
|
143
|
+
#### config -- Configuration Management
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
mxroute config setup # Interactive configuration wizard
|
|
147
|
+
mxroute config smtp # Configure SMTP credentials
|
|
148
|
+
mxroute config remove-smtp # Remove SMTP credentials
|
|
149
|
+
mxroute config show # Show current config (passwords masked)
|
|
150
|
+
mxroute config profiles # List all saved profiles
|
|
151
|
+
mxroute config switch [name] # Switch between profiles
|
|
152
|
+
mxroute config delete [name] # Delete a profile
|
|
153
|
+
```
|
|
67
154
|
|
|
68
|
-
|
|
155
|
+
#### auth -- Authentication
|
|
69
156
|
|
|
70
157
|
```bash
|
|
71
|
-
mxroute auth login
|
|
72
|
-
mxroute auth status
|
|
73
|
-
mxroute auth logout
|
|
158
|
+
mxroute auth login # Interactive login with Login Key
|
|
159
|
+
mxroute auth status # Verify stored credentials are valid
|
|
160
|
+
mxroute auth logout # Remove stored credentials
|
|
74
161
|
```
|
|
75
162
|
|
|
76
163
|
**Example:**
|
|
@@ -82,297 +169,332 @@ $ mxroute auth login
|
|
|
82
169
|
✔ Authentication successful!
|
|
83
170
|
```
|
|
84
171
|
|
|
85
|
-
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### Email Management
|
|
175
|
+
|
|
176
|
+
#### domains -- Domain Management
|
|
86
177
|
|
|
87
|
-
|
|
178
|
+
```bash
|
|
179
|
+
mxroute domains list # List all domains with alias counts
|
|
180
|
+
mxroute domains info [domain] # Show details for a domain
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
#### accounts -- Email Accounts
|
|
88
184
|
|
|
89
185
|
```bash
|
|
90
|
-
mxroute
|
|
91
|
-
mxroute
|
|
92
|
-
mxroute
|
|
93
|
-
mxroute
|
|
94
|
-
mxroute config switch work # Switch to a named profile
|
|
95
|
-
mxroute config delete # Delete a profile (interactive)
|
|
96
|
-
mxroute config delete old # Delete a named profile
|
|
186
|
+
mxroute accounts list [domain] # List email accounts
|
|
187
|
+
mxroute accounts create [domain] # Create an email account (interactive)
|
|
188
|
+
mxroute accounts delete [domain] # Delete an email account
|
|
189
|
+
mxroute accounts passwd [domain] # Change account password
|
|
97
190
|
```
|
|
98
191
|
|
|
99
|
-
**Example
|
|
192
|
+
**Example:**
|
|
100
193
|
```bash
|
|
101
|
-
$ mxroute
|
|
102
|
-
|
|
103
|
-
|
|
194
|
+
$ mxroute accounts create example.com
|
|
195
|
+
? Username (before @example.com): info
|
|
196
|
+
? Password: ••••••••
|
|
197
|
+
? Confirm password: ••••••••
|
|
198
|
+
? Quota in MB (0 = unlimited): 0
|
|
199
|
+
? Create info@example.com? Yes
|
|
200
|
+
✔ Created info@example.com
|
|
104
201
|
```
|
|
105
202
|
|
|
106
|
-
|
|
203
|
+
#### forwarders / fwd -- Email Forwarders
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
mxroute forwarders list [domain] # List all forwarders
|
|
207
|
+
mxroute forwarders create [domain] # Create a forwarder (interactive)
|
|
208
|
+
mxroute forwarders delete [domain] # Delete a forwarder
|
|
209
|
+
```
|
|
107
210
|
|
|
108
|
-
|
|
211
|
+
#### autoresponder / vacation -- Autoresponders
|
|
109
212
|
|
|
110
213
|
```bash
|
|
111
|
-
mxroute
|
|
112
|
-
mxroute
|
|
214
|
+
mxroute autoresponder list [domain] # List all autoresponders
|
|
215
|
+
mxroute autoresponder create [domain] # Create autoresponder (opens editor)
|
|
216
|
+
mxroute autoresponder edit [domain] # Edit existing autoresponder
|
|
217
|
+
mxroute autoresponder delete [domain] # Delete an autoresponder
|
|
113
218
|
```
|
|
114
219
|
|
|
115
|
-
|
|
220
|
+
#### catchall -- Catch-All / Default Address
|
|
116
221
|
|
|
117
|
-
|
|
222
|
+
```bash
|
|
223
|
+
mxroute catchall get [domain] # Show current catch-all setting
|
|
224
|
+
mxroute catchall set [domain] # Configure catch-all (interactive)
|
|
225
|
+
```
|
|
118
226
|
|
|
119
|
-
|
|
227
|
+
Options: forward to existing account, forward to custom email, reject (`:fail:`), or disable (`:blackhole:`).
|
|
120
228
|
|
|
121
|
-
|
|
229
|
+
#### filters -- Email Filters
|
|
122
230
|
|
|
123
231
|
```bash
|
|
124
|
-
mxroute
|
|
125
|
-
mxroute
|
|
126
|
-
mxroute
|
|
232
|
+
mxroute filters list [domain] # List filters for an account
|
|
233
|
+
mxroute filters create [domain] # Create a filter (interactive)
|
|
234
|
+
mxroute filters delete [domain] # Delete a filter
|
|
127
235
|
```
|
|
128
236
|
|
|
129
|
-
|
|
237
|
+
Supports matching on from, to, subject, or body with actions to discard, forward, or move to a folder.
|
|
130
238
|
|
|
131
|
-
|
|
239
|
+
#### lists / mailinglist -- Mailing Lists
|
|
132
240
|
|
|
133
241
|
```bash
|
|
134
|
-
mxroute
|
|
135
|
-
mxroute
|
|
136
|
-
mxroute
|
|
137
|
-
mxroute
|
|
138
|
-
mxroute
|
|
139
|
-
mxroute
|
|
242
|
+
mxroute lists list [domain] # List all mailing lists
|
|
243
|
+
mxroute lists create [domain] # Create a mailing list
|
|
244
|
+
mxroute lists delete [domain] # Delete a mailing list
|
|
245
|
+
mxroute lists members [domain] # Show members of a list
|
|
246
|
+
mxroute lists add-member [domain] # Add a member
|
|
247
|
+
mxroute lists remove-member [domain] # Remove a member
|
|
140
248
|
```
|
|
141
249
|
|
|
142
|
-
|
|
250
|
+
#### aliases -- Domain Aliases / Pointers
|
|
143
251
|
|
|
144
|
-
**Example -- creating an account:**
|
|
145
252
|
```bash
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
? Confirm password: ••••••••
|
|
150
|
-
? Quota in MB (0 = unlimited): 0
|
|
151
|
-
? Create info@example.com? Yes
|
|
152
|
-
✔ Created info@example.com
|
|
253
|
+
mxroute aliases list [domain] # List domain aliases
|
|
254
|
+
mxroute aliases add [domain] # Add a domain alias
|
|
255
|
+
mxroute aliases remove [domain] # Remove a domain alias
|
|
153
256
|
```
|
|
154
257
|
|
|
155
|
-
|
|
258
|
+
> **How aliases work:** If `primary.com` has `user@primary.com`, adding `alias.com` as a pointer means `user@alias.com` also works -- all accounts are shared.
|
|
156
259
|
|
|
157
|
-
|
|
260
|
+
#### quota -- Quota and Usage
|
|
158
261
|
|
|
159
262
|
```bash
|
|
160
|
-
mxroute
|
|
161
|
-
mxroute
|
|
162
|
-
mxroute forwarders delete [domain] # Delete a forwarder (picks from list)
|
|
263
|
+
mxroute quota show # Account-wide usage overview
|
|
264
|
+
mxroute quota set [domain] # Set quota for a specific account
|
|
163
265
|
```
|
|
164
266
|
|
|
165
|
-
|
|
267
|
+
**Example output:**
|
|
268
|
+
```
|
|
269
|
+
┌─ Resource Usage ─────────────────────────────────────────────┐
|
|
270
|
+
│ Disk Usage 3.19MB / 100.0GB [--------------------] 0% │
|
|
271
|
+
│ Bandwidth 1.26MB / unlimited │
|
|
272
|
+
│ Email Accounts 12 / unlimited │
|
|
273
|
+
│ Domains 3 / unlimited │
|
|
274
|
+
│ Forwarders 1 / unlimited │
|
|
275
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
166
279
|
|
|
167
|
-
###
|
|
280
|
+
### DNS Management
|
|
168
281
|
|
|
169
|
-
|
|
282
|
+
#### dns -- DNS Health and Records
|
|
170
283
|
|
|
171
284
|
```bash
|
|
172
|
-
mxroute
|
|
173
|
-
mxroute
|
|
174
|
-
mxroute
|
|
175
|
-
mxroute
|
|
285
|
+
mxroute dns check [domain] # Health check via DNS lookup
|
|
286
|
+
mxroute dns records [domain] # Show required DNS records for your server
|
|
287
|
+
mxroute dns generate [domain] # Generate zone file for your DNS provider
|
|
288
|
+
mxroute dns setup [domain] # Auto-configure via registrar API
|
|
289
|
+
mxroute dns watch [domain] # Real-time DNS propagation monitoring
|
|
176
290
|
```
|
|
177
291
|
|
|
178
|
-
|
|
292
|
+
**What `dns check` verifies:**
|
|
293
|
+
- **MX** -- primary and relay records pointing to your MXroute server
|
|
294
|
+
- **SPF** -- `v=spf1 include:mxroute.com -all` present with hard fail
|
|
295
|
+
- **DKIM** -- `x._domainkey` TXT record with valid DKIM1 key
|
|
296
|
+
- **DMARC** -- `_dmarc` TXT record with quarantine or reject policy
|
|
297
|
+
- **CNAME** -- custom hostnames for mail/webmail (optional)
|
|
298
|
+
|
|
299
|
+
**`dns generate` supports:** Cloudflare, Namecheap, Route53/AWS, and generic providers.
|
|
179
300
|
|
|
180
|
-
|
|
301
|
+
#### dnsrecords / dnsapi -- DNS Record Management via API
|
|
181
302
|
|
|
182
|
-
|
|
303
|
+
Manage DNS records directly on your MXroute server. Requires authentication.
|
|
183
304
|
|
|
184
305
|
```bash
|
|
185
|
-
mxroute
|
|
186
|
-
mxroute
|
|
306
|
+
mxroute dnsrecords list [domain] # List all DNS records from server
|
|
307
|
+
mxroute dnsrecords add [domain] # Add a record (A, AAAA, CNAME, MX, TXT, SRV)
|
|
308
|
+
mxroute dnsrecords delete [domain] # Delete a DNS record
|
|
309
|
+
mxroute dnsrecords dkim [domain] # Retrieve the full DKIM key
|
|
187
310
|
```
|
|
188
311
|
|
|
189
|
-
|
|
190
|
-
- **Forward to existing account** -- picks from your email accounts
|
|
191
|
-
- **Forward to custom email** -- any external address
|
|
192
|
-
- **Reject** (`:fail:`) -- bounce back to sender
|
|
193
|
-
- **Disable** (`:blackhole:`) -- silently discard
|
|
312
|
+
---
|
|
194
313
|
|
|
195
|
-
###
|
|
314
|
+
### Email Sending
|
|
196
315
|
|
|
197
|
-
|
|
316
|
+
#### send -- Send Email via SMTP
|
|
198
317
|
|
|
199
318
|
```bash
|
|
200
|
-
mxroute
|
|
201
|
-
mxroute
|
|
202
|
-
mxroute
|
|
203
|
-
mxroute
|
|
319
|
+
mxroute send # Interactive composer
|
|
320
|
+
mxroute send -t user@example.com -s "Subject" -b "Body" # Send with flags
|
|
321
|
+
mxroute send -t user@example.com -s "Hi" --html -b "<h1>Hello</h1>" # HTML email
|
|
322
|
+
mxroute send -f alias@example.com -t user@example.com -s "Hi" -b "Body" # Custom from
|
|
323
|
+
mxroute send -t user@example.com -s "Report" --file report.pdf # With attachment
|
|
204
324
|
```
|
|
205
325
|
|
|
206
|
-
|
|
326
|
+
| Flag | Description |
|
|
327
|
+
|---|---|
|
|
328
|
+
| `-t, --to <email>` | Recipient email address |
|
|
329
|
+
| `-s, --subject <text>` | Email subject line |
|
|
330
|
+
| `-b, --body <text>` | Email body content |
|
|
331
|
+
| `-f, --from <email>` | Sender address (defaults to configured account) |
|
|
332
|
+
| `--html` | Treat body as raw HTML |
|
|
333
|
+
| `--file <path>` | Attach a file |
|
|
207
334
|
|
|
208
|
-
|
|
209
|
-
- **Required score** (1-10) -- lower = more aggressive filtering
|
|
210
|
-
- **Spam delivery** -- move to spam folder, leave in inbox, or delete
|
|
211
|
-
- **High score threshold** -- separate action for very high scoring spam
|
|
212
|
-
- **High score action** -- what to do with high-scoring spam
|
|
335
|
+
#### test -- Test Email
|
|
213
336
|
|
|
214
|
-
|
|
337
|
+
```bash
|
|
338
|
+
mxroute test # Send a test email to yourself
|
|
339
|
+
```
|
|
215
340
|
|
|
216
|
-
|
|
341
|
+
#### webhook -- Email Webhook Server
|
|
217
342
|
|
|
218
|
-
|
|
343
|
+
Start a local HTTP server that accepts POST requests and relays them as email through MXroute SMTP.
|
|
219
344
|
|
|
220
345
|
```bash
|
|
221
|
-
mxroute
|
|
222
|
-
mxroute
|
|
223
|
-
mxroute filters delete [domain] # Delete a filter (picks from list)
|
|
346
|
+
mxroute webhook # Start on default port 3025
|
|
347
|
+
mxroute webhook --port 8080 # Custom port
|
|
224
348
|
```
|
|
225
349
|
|
|
226
|
-
**
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
- **Actions**: discard, forward to address, move to folder
|
|
350
|
+
**Endpoints:**
|
|
351
|
+
- `POST /send` -- send an email (`{ "to": "...", "subject": "...", "body": "..." }`)
|
|
352
|
+
- `GET /health` -- health check
|
|
230
353
|
|
|
231
|
-
|
|
354
|
+
---
|
|
232
355
|
|
|
233
|
-
|
|
356
|
+
### Spam and Security
|
|
357
|
+
|
|
358
|
+
#### spam -- SpamAssassin Configuration
|
|
234
359
|
|
|
235
360
|
```bash
|
|
236
|
-
mxroute
|
|
237
|
-
mxroute
|
|
238
|
-
mxroute
|
|
239
|
-
mxroute
|
|
240
|
-
mxroute lists add-member [domain] # Add a member to a list
|
|
241
|
-
mxroute lists remove-member [domain] # Remove a member from a list
|
|
361
|
+
mxroute spam status [domain] # Show current SpamAssassin config
|
|
362
|
+
mxroute spam enable [domain] # Enable with defaults (score 5, spam folder)
|
|
363
|
+
mxroute spam disable [domain] # Disable SpamAssassin
|
|
364
|
+
mxroute spam config [domain] # Interactive configuration wizard
|
|
242
365
|
```
|
|
243
366
|
|
|
244
|
-
|
|
367
|
+
Configuration options: required score (1-10), spam delivery action (move to folder, leave in inbox, delete), high score threshold, and high score action.
|
|
245
368
|
|
|
246
|
-
|
|
369
|
+
#### audit -- Security Audit
|
|
247
370
|
|
|
248
|
-
|
|
371
|
+
Run a comprehensive security audit across all domains with a scored report.
|
|
249
372
|
|
|
250
373
|
```bash
|
|
251
|
-
mxroute
|
|
252
|
-
mxroute aliases add [domain] # Add a domain alias
|
|
253
|
-
mxroute aliases remove [domain] # Remove a domain alias
|
|
374
|
+
mxroute audit # Full security audit with score
|
|
254
375
|
```
|
|
255
376
|
|
|
256
|
-
|
|
377
|
+
Checks: DNS configuration, SPF lookup count, catch-all settings, forwarding loops, and more.
|
|
257
378
|
|
|
258
|
-
|
|
379
|
+
#### ip / blacklist -- IP Blacklist Check
|
|
259
380
|
|
|
260
|
-
|
|
381
|
+
```bash
|
|
382
|
+
mxroute ip # Check server IP against 10 DNS blacklists
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
### Monitoring and Operations
|
|
388
|
+
|
|
389
|
+
#### monitor -- Health Monitoring
|
|
390
|
+
|
|
391
|
+
Cron-friendly health check that tests DNS, port connectivity, and SMTP API across all domains.
|
|
261
392
|
|
|
262
393
|
```bash
|
|
263
|
-
mxroute
|
|
264
|
-
mxroute
|
|
394
|
+
mxroute monitor # Run health check with full output
|
|
395
|
+
mxroute monitor --quiet # Exit code only (0 = healthy, 1 = issue)
|
|
396
|
+
mxroute monitor --alert # Send email alert on failure
|
|
265
397
|
```
|
|
266
398
|
|
|
267
|
-
|
|
399
|
+
#### cron -- Cron Job Management
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
mxroute cron setup # Install monitoring cron job
|
|
403
|
+
mxroute cron remove # Remove monitoring cron job
|
|
268
404
|
```
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
│ Forwarders 1 / unlimited │
|
|
275
|
-
└──────────────────────────────────────────────────────────────────┘
|
|
405
|
+
|
|
406
|
+
#### doctor / healthcheck -- Comprehensive Diagnostics
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
mxroute doctor # Run checks across all domains
|
|
276
410
|
```
|
|
277
411
|
|
|
278
|
-
|
|
412
|
+
#### benchmark / bench -- Connection Speed Test
|
|
279
413
|
|
|
280
|
-
|
|
414
|
+
```bash
|
|
415
|
+
mxroute benchmark # Test IMAP/SMTP connection speed
|
|
416
|
+
```
|
|
281
417
|
|
|
282
|
-
|
|
418
|
+
---
|
|
283
419
|
|
|
284
|
-
|
|
420
|
+
### Data Management
|
|
285
421
|
|
|
286
|
-
|
|
422
|
+
#### export -- Export Configuration
|
|
287
423
|
|
|
288
424
|
```bash
|
|
289
|
-
mxroute
|
|
290
|
-
mxroute
|
|
291
|
-
mxroute dns records # Show required DNS records for your server
|
|
292
|
-
mxroute dns records example.com # Show for specific domain
|
|
293
|
-
mxroute dns generate # Generate zone file (picks DNS provider)
|
|
294
|
-
mxroute dns generate example.com # Generate for specific domain
|
|
425
|
+
mxroute export # Export all domains to JSON
|
|
426
|
+
mxroute export example.com # Export specific domain
|
|
295
427
|
```
|
|
296
428
|
|
|
297
|
-
|
|
298
|
-
- **MX** -- primary and relay records pointing to your MXroute server
|
|
299
|
-
- **SPF** -- `v=spf1 include:mxroute.com -all` present, single record, hard fail
|
|
300
|
-
- **DKIM** -- `x._domainkey` TXT record with valid DKIM1 key
|
|
301
|
-
- **DMARC** -- `_dmarc` TXT record with quarantine or reject policy
|
|
302
|
-
- **CNAME** -- custom hostnames for mail/webmail (optional)
|
|
303
|
-
|
|
304
|
-
**`dns generate` supports:**
|
|
305
|
-
- Cloudflare (with proxy-off warning)
|
|
306
|
-
- Namecheap
|
|
307
|
-
- Route53 / AWS (with quoting notes)
|
|
308
|
-
- Generic / other providers
|
|
429
|
+
#### import -- Import Configuration
|
|
309
430
|
|
|
310
|
-
|
|
431
|
+
```bash
|
|
432
|
+
mxroute import backup.json # Restore from export file
|
|
433
|
+
```
|
|
311
434
|
|
|
312
|
-
|
|
435
|
+
#### diff -- Compare Exports
|
|
313
436
|
|
|
314
437
|
```bash
|
|
315
|
-
mxroute
|
|
316
|
-
mxroute dnsrecords add [domain] # Add a record (A, AAAA, CNAME, MX, TXT, SRV)
|
|
317
|
-
mxroute dnsrecords delete [domain] # Delete a DNS record
|
|
318
|
-
mxroute dnsrecords dkim [domain] # Retrieve the full DKIM key for your domain
|
|
438
|
+
mxroute diff before.json after.json # Compare two export files
|
|
319
439
|
```
|
|
320
440
|
|
|
321
|
-
|
|
441
|
+
#### bulk -- Bulk Operations
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
mxroute bulk accounts accounts.csv # Create accounts from CSV
|
|
445
|
+
mxroute bulk forwarders fwd.csv # Create forwarders from CSV
|
|
446
|
+
```
|
|
322
447
|
|
|
323
448
|
---
|
|
324
449
|
|
|
325
|
-
###
|
|
450
|
+
### Troubleshooting
|
|
326
451
|
|
|
327
|
-
|
|
452
|
+
#### troubleshoot / diagnose -- Interactive Wizard
|
|
328
453
|
|
|
329
454
|
```bash
|
|
330
|
-
mxroute
|
|
331
|
-
mxroute send -t user@example.com -s "Subject" -b "Body text" # Send with flags
|
|
332
|
-
mxroute send -t user@example.com -s "Hi" --html -b "<h1>Hello</h1>" # HTML body
|
|
333
|
-
mxroute send -f alias@example.com -t user@example.com -s "Hi" -b "Body" # Custom from
|
|
334
|
-
mxroute test # Send a test email to yourself
|
|
455
|
+
mxroute troubleshoot # Launch interactive wizard
|
|
335
456
|
```
|
|
336
457
|
|
|
337
|
-
|
|
338
|
-
| Flag | Description |
|
|
339
|
-
|---|---|
|
|
340
|
-
| `-t, --to <email>` | Recipient email address |
|
|
341
|
-
| `-s, --subject <text>` | Email subject line |
|
|
342
|
-
| `-b, --body <text>` | Email body content |
|
|
343
|
-
| `-f, --from <email>` | Sender address (defaults to configured username) |
|
|
344
|
-
| `--html` | Treat body as raw HTML (otherwise auto-wrapped) |
|
|
345
|
-
|
|
346
|
-
**SMTP API limitations:**
|
|
347
|
-
- 400 emails per hour per email address
|
|
348
|
-
- Single recipient per request
|
|
349
|
-
- No file attachments
|
|
350
|
-
- Body size limit ~10MB
|
|
351
|
-
- Marketing/promotional email is prohibited
|
|
458
|
+
Covers 10 issue categories:
|
|
352
459
|
|
|
353
|
-
|
|
460
|
+
1. Emails going to spam (Gmail)
|
|
461
|
+
2. Emails going to spam (Microsoft)
|
|
462
|
+
3. Cannot connect to server
|
|
463
|
+
4. Authentication failures
|
|
464
|
+
5. Emails not being delivered
|
|
465
|
+
6. DNS configuration issues
|
|
466
|
+
7. SSL certificate warnings
|
|
467
|
+
8. Common error messages (550 Auth Required, Sender Verify Failed, etc.)
|
|
468
|
+
9. Migration issues (imapsync guide)
|
|
469
|
+
10. Spam filter blocking legitimate mail
|
|
354
470
|
|
|
355
|
-
|
|
471
|
+
#### share -- Shareable Setup Page
|
|
356
472
|
|
|
357
473
|
```bash
|
|
358
|
-
mxroute
|
|
359
|
-
mxroute
|
|
360
|
-
mxroute info caldav # CalDAV/CardDAV server and setup guides
|
|
361
|
-
mxroute info api # SMTP API endpoint, fields, and limits
|
|
362
|
-
mxroute info limits # Service limits and policies
|
|
363
|
-
mxroute info panels # Management and Control Panel URLs
|
|
364
|
-
mxroute info all # Everything at once
|
|
474
|
+
mxroute share # Generate setup page for terminal
|
|
475
|
+
mxroute share user@example.com # Generate for specific email
|
|
365
476
|
```
|
|
366
477
|
|
|
367
|
-
|
|
478
|
+
Produces an HTML page or terminal output with connection details to share with end users.
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
### Connection Info
|
|
483
|
+
|
|
484
|
+
Quick reference for email client settings and service details.
|
|
485
|
+
|
|
368
486
|
```bash
|
|
369
|
-
mxroute info
|
|
370
|
-
mxroute info
|
|
371
|
-
mxroute info
|
|
372
|
-
mxroute info
|
|
487
|
+
mxroute info connections # IMAP/SMTP/POP3 ports table
|
|
488
|
+
mxroute info webmail # Webmail URLs (Crossbox, Roundcube)
|
|
489
|
+
mxroute info caldav # CalDAV/CardDAV setup
|
|
490
|
+
mxroute info api # SMTP API endpoint and limits
|
|
491
|
+
mxroute info limits # Service limits and policies
|
|
492
|
+
mxroute info panels # Management and Control Panel URLs
|
|
493
|
+
mxroute info all # Everything at once
|
|
494
|
+
mxroute info client <name> # Client setup guide (ios, outlook, thunderbird, generic)
|
|
373
495
|
```
|
|
374
496
|
|
|
375
|
-
**Connection settings
|
|
497
|
+
**Connection settings:**
|
|
376
498
|
|
|
377
499
|
| Protocol | Port | Encryption | Recommended |
|
|
378
500
|
|---|---|---|---|
|
|
@@ -384,64 +506,223 @@ mxroute info client generic # Generic IMAP/SMTP settings
|
|
|
384
506
|
| SMTP | 587 | STARTTLS | Alternative |
|
|
385
507
|
| SMTP | 2525 | STARTTLS | If 587 blocked |
|
|
386
508
|
|
|
387
|
-
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Configuration
|
|
512
|
+
|
|
513
|
+
Configuration is stored at `~/.config/mxroute-cli/config.json` with file permissions `0600` (owner-only read/write).
|
|
388
514
|
|
|
389
|
-
|
|
515
|
+
### Multiple Profiles
|
|
516
|
+
|
|
517
|
+
Manage different MXroute accounts from one CLI:
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
# Create profiles
|
|
521
|
+
mxroute config setup # First run creates "default" profile
|
|
522
|
+
mxroute config setup # Enter "work" as profile name for second
|
|
523
|
+
|
|
524
|
+
# Switch between them
|
|
525
|
+
mxroute config switch # Interactive picker
|
|
526
|
+
mxroute config switch work # Switch directly by name
|
|
527
|
+
mxroute config profiles # List all profiles
|
|
528
|
+
|
|
529
|
+
# Delete a profile
|
|
530
|
+
mxroute config delete old # Delete by name
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
---
|
|
534
|
+
|
|
535
|
+
## MCP Server
|
|
536
|
+
|
|
537
|
+
The `mxroute-mcp` binary exposes 36 tools via the [Model Context Protocol](https://modelcontextprotocol.io), allowing AI assistants to manage your MXroute account.
|
|
538
|
+
|
|
539
|
+
### Supported Clients
|
|
540
|
+
|
|
541
|
+
- Claude Code
|
|
542
|
+
- Claude Desktop
|
|
543
|
+
- Cursor
|
|
544
|
+
- Windsurf
|
|
545
|
+
- OpenCode
|
|
546
|
+
- Cline
|
|
547
|
+
- Continue.dev
|
|
548
|
+
|
|
549
|
+
### Quick Setup
|
|
550
|
+
|
|
551
|
+
The setup wizard auto-detects installed clients and configures them:
|
|
390
552
|
|
|
391
553
|
```bash
|
|
392
|
-
mxroute
|
|
393
|
-
|
|
554
|
+
mxroute setup
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
### Manual Configuration
|
|
558
|
+
|
|
559
|
+
Add to your MCP client config:
|
|
560
|
+
|
|
561
|
+
```json
|
|
562
|
+
{
|
|
563
|
+
"mcpServers": {
|
|
564
|
+
"mxroute": {
|
|
565
|
+
"command": "mxroute-mcp",
|
|
566
|
+
"args": []
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
394
570
|
```
|
|
395
571
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
3. **Cannot connect to server** -- ports, firewall, ISP blocking, live connection test
|
|
400
|
-
4. **Authentication failures** -- username format, password reset, encryption settings
|
|
401
|
-
5. **Emails not being delivered** -- DNS check, sender verification, bounce analysis
|
|
402
|
-
6. **DNS configuration issues** -- common mistakes checklist, live DNS check
|
|
403
|
-
7. **SSL certificate warnings** -- CNAME setup, certificate request steps
|
|
404
|
-
8. **Common error messages** -- 550 Auth Required, Sender Verify Failed, 5.7.515, etc.
|
|
405
|
-
9. **Migration issues** -- imapsync command, step-by-step migration guide
|
|
406
|
-
10. **Spam filter blocking legitimate mail** -- whitelist requests, filter toggle
|
|
572
|
+
### Available MCP Tools
|
|
573
|
+
|
|
574
|
+
The MCP server provides tools for domains, email accounts, forwarders, autoresponders, catch-all, spam config, DNS records, DKIM keys, email filters, mailing lists, domain aliases, quota management, sending email, and DNS health checks.
|
|
407
575
|
|
|
408
576
|
---
|
|
409
577
|
|
|
410
|
-
##
|
|
578
|
+
## Automated DNS Setup
|
|
411
579
|
|
|
412
|
-
|
|
580
|
+
The `dns setup` command can automatically create all required MXroute DNS records at your registrar via API.
|
|
413
581
|
|
|
414
|
-
|
|
582
|
+
### Supported Registrars
|
|
583
|
+
|
|
584
|
+
| Registrar | API Support | Credentials Needed |
|
|
585
|
+
|---|---|---|
|
|
586
|
+
| **Cloudflare** | Full | API Token |
|
|
587
|
+
| **Porkbun** | Full | API Key + Secret Key |
|
|
588
|
+
| **DigitalOcean** | Full | API Token |
|
|
589
|
+
| **Namecheap** | Limited | API Key + Username |
|
|
590
|
+
|
|
591
|
+
### Usage
|
|
415
592
|
|
|
416
593
|
```bash
|
|
417
|
-
mxroute
|
|
594
|
+
mxroute dns setup example.com
|
|
418
595
|
```
|
|
419
596
|
|
|
420
|
-
|
|
597
|
+
The wizard will:
|
|
598
|
+
1. Ask which registrar manages your DNS
|
|
599
|
+
2. Prompt for API credentials (saved for reuse)
|
|
600
|
+
3. Retrieve your DKIM key from the server
|
|
601
|
+
4. Create MX, SPF, DKIM, and DMARC records automatically
|
|
602
|
+
5. Verify the records propagated correctly
|
|
421
603
|
|
|
422
|
-
|
|
423
|
-
|---|---|---|---|
|
|
424
|
-
| **SMTP credentials** | Sending email | `mxroute config setup` | `send`, `test` |
|
|
425
|
-
| **DirectAdmin Login Key** | Account management | `mxroute auth login` | `domains`, `accounts`, `forwarders`, `autoresponder`, `catchall`, `spam`, `dnsrecords`, `filters`, `lists`, `aliases`, `quota` |
|
|
604
|
+
### Propagation Monitoring
|
|
426
605
|
|
|
427
|
-
|
|
606
|
+
After making DNS changes, watch propagation in real time:
|
|
428
607
|
|
|
429
|
-
|
|
608
|
+
```bash
|
|
609
|
+
mxroute dns watch example.com
|
|
610
|
+
```
|
|
430
611
|
|
|
431
|
-
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
## Monitoring and Cron
|
|
615
|
+
|
|
616
|
+
### Health Monitoring
|
|
617
|
+
|
|
618
|
+
The `monitor` command checks DNS records, port connectivity (IMAP/SMTP), and SMTP API health across all your domains.
|
|
432
619
|
|
|
433
620
|
```bash
|
|
434
|
-
#
|
|
435
|
-
mxroute
|
|
436
|
-
mxroute config setup # Enter "work" as profile name for second
|
|
621
|
+
# Full output
|
|
622
|
+
mxroute monitor
|
|
437
623
|
|
|
438
|
-
#
|
|
439
|
-
mxroute
|
|
440
|
-
mxroute config switch work # Switch by name
|
|
441
|
-
mxroute config profiles # List all profiles
|
|
624
|
+
# Silent mode for cron (exit code only)
|
|
625
|
+
mxroute monitor --quiet
|
|
442
626
|
|
|
443
|
-
#
|
|
444
|
-
mxroute
|
|
627
|
+
# Send email alert on failure
|
|
628
|
+
mxroute monitor --alert
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Cron Job Setup
|
|
632
|
+
|
|
633
|
+
Install automatic monitoring that runs on a schedule:
|
|
634
|
+
|
|
635
|
+
```bash
|
|
636
|
+
# Install the cron job
|
|
637
|
+
mxroute cron setup
|
|
638
|
+
|
|
639
|
+
# Remove the cron job
|
|
640
|
+
mxroute cron remove
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
645
|
+
## Shell Completions
|
|
646
|
+
|
|
647
|
+
Generate shell completion scripts for tab completion of commands and options.
|
|
648
|
+
|
|
649
|
+
```bash
|
|
650
|
+
mxroute completions bash # Bash completions
|
|
651
|
+
mxroute completions zsh # Zsh completions
|
|
652
|
+
mxroute completions fish # Fish completions
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
**Install for your shell:**
|
|
656
|
+
|
|
657
|
+
```bash
|
|
658
|
+
# Bash
|
|
659
|
+
mxroute completions bash >> ~/.bashrc
|
|
660
|
+
|
|
661
|
+
# Zsh
|
|
662
|
+
mxroute completions zsh >> ~/.zshrc
|
|
663
|
+
|
|
664
|
+
# Fish
|
|
665
|
+
mxroute completions fish > ~/.config/fish/completions/mxroute.fish
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
---
|
|
669
|
+
|
|
670
|
+
## Development
|
|
671
|
+
|
|
672
|
+
### Setup
|
|
673
|
+
|
|
674
|
+
```bash
|
|
675
|
+
git clone https://github.com/t-rhex/mxroute-cli.git
|
|
676
|
+
cd mxroute-cli
|
|
677
|
+
npm install
|
|
678
|
+
npm run build
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
### Scripts
|
|
682
|
+
|
|
683
|
+
| Script | Description |
|
|
684
|
+
|---|---|
|
|
685
|
+
| `npm run build` | Compile TypeScript |
|
|
686
|
+
| `npm run dev` | Watch mode for development |
|
|
687
|
+
| `npm test` | Run tests (Vitest) |
|
|
688
|
+
| `npm run test:watch` | Run tests in watch mode |
|
|
689
|
+
| `npm run test:coverage` | Run tests with coverage |
|
|
690
|
+
| `npm run lint` | Lint with ESLint |
|
|
691
|
+
| `npm run lint:fix` | Auto-fix lint issues |
|
|
692
|
+
| `npm run format` | Format with Prettier |
|
|
693
|
+
| `npm run typecheck` | Type check without emitting |
|
|
694
|
+
| `npm run ci` | Full CI pipeline (lint + typecheck + build + test) |
|
|
695
|
+
|
|
696
|
+
### Test Suite
|
|
697
|
+
|
|
698
|
+
78 tests across 15 test files covering API, audit, benchmark, blacklist, CLI, completions, config, diff, DirectAdmin, DNS, MCP, monitor, share, theme, and webhook functionality.
|
|
699
|
+
|
|
700
|
+
### Code Quality
|
|
701
|
+
|
|
702
|
+
- ESLint and Prettier enforce consistent style
|
|
703
|
+
- Husky pre-commit hooks run lint-staged on every commit
|
|
704
|
+
- GitHub Actions CI validates on Node.js 20 and 22
|
|
705
|
+
- Tag-based release workflow publishes to npm with provenance
|
|
706
|
+
|
|
707
|
+
### Project Structure
|
|
708
|
+
|
|
709
|
+
```
|
|
710
|
+
src/
|
|
711
|
+
index.ts # CLI entry point (Commander.js)
|
|
712
|
+
mcp.ts # MCP server entry point
|
|
713
|
+
commands/ # 35 command modules
|
|
714
|
+
utils/ # Shared utilities (API, config, DNS, DirectAdmin, registrars)
|
|
715
|
+
tests/ # 15 test files (Vitest)
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### Releasing
|
|
719
|
+
|
|
720
|
+
Releases are automated via GitHub Actions. Push a version tag to trigger npm publish:
|
|
721
|
+
|
|
722
|
+
```bash
|
|
723
|
+
npm run release # Patch version bump
|
|
724
|
+
npm run release:minor # Minor version bump
|
|
725
|
+
npm run release:major # Major version bump
|
|
445
726
|
```
|
|
446
727
|
|
|
447
728
|
---
|
|
@@ -454,9 +735,11 @@ mxroute config delete old # Delete by name
|
|
|
454
735
|
| **Control Panel** | https://panel.mxroute.com | Email accounts, forwarders, domains, DNS, spam, webmail |
|
|
455
736
|
| **Whitelist Request** | https://whitelistrequest.mxrouting.net | Request IP/domain whitelist for spam filter |
|
|
456
737
|
|
|
738
|
+
---
|
|
739
|
+
|
|
457
740
|
## Requirements
|
|
458
741
|
|
|
459
|
-
- Node.js >=
|
|
742
|
+
- Node.js >= 20
|
|
460
743
|
- An [MXroute](https://mxroute.com) email hosting account
|
|
461
744
|
|
|
462
745
|
## License
|