@bobfrankston/rmfmail 1.0.467
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 +429 -0
- package/bin/build-icon-ico.js +283 -0
- package/bin/lean-accounts.js +172 -0
- package/bin/mailx.js +1580 -0
- package/bin/mailx.js.map +1 -0
- package/bin/mailx.ts +1549 -0
- package/bin/postinstall.js +39 -0
- package/bin/postinstall.js.map +1 -0
- package/bin/postinstall.ts +41 -0
- package/bin/tsconfig.json +10 -0
- package/client/.gitattributes +10 -0
- package/client/.msger-window.json +1 -0
- package/client/android.html +226 -0
- package/client/app.js +3400 -0
- package/client/app.js.map +1 -0
- package/client/app.ts +3190 -0
- package/client/components/address-book.js +199 -0
- package/client/components/address-book.js.map +1 -0
- package/client/components/address-book.ts +204 -0
- package/client/components/alarms.js +299 -0
- package/client/components/alarms.js.map +1 -0
- package/client/components/alarms.ts +276 -0
- package/client/components/calendar-sidebar.js +508 -0
- package/client/components/calendar-sidebar.js.map +1 -0
- package/client/components/calendar-sidebar.ts +474 -0
- package/client/components/calendar.js +217 -0
- package/client/components/calendar.js.map +1 -0
- package/client/components/calendar.ts +211 -0
- package/client/components/context-menu.js +80 -0
- package/client/components/context-menu.js.map +1 -0
- package/client/components/context-menu.ts +95 -0
- package/client/components/folder-picker.js +119 -0
- package/client/components/folder-picker.js.map +1 -0
- package/client/components/folder-picker.ts +127 -0
- package/client/components/folder-tree.js +1093 -0
- package/client/components/folder-tree.js.map +1 -0
- package/client/components/folder-tree.ts +1069 -0
- package/client/components/message-list.js +1140 -0
- package/client/components/message-list.js.map +1 -0
- package/client/components/message-list.ts +1129 -0
- package/client/components/message-viewer.js +1291 -0
- package/client/components/message-viewer.js.map +1 -0
- package/client/components/message-viewer.ts +1257 -0
- package/client/components/outbox-view.js +104 -0
- package/client/components/outbox-view.js.map +1 -0
- package/client/components/outbox-view.ts +102 -0
- package/client/components/tasks.js +261 -0
- package/client/components/tasks.js.map +1 -0
- package/client/components/tasks.ts +234 -0
- package/client/compose/compose.css +560 -0
- package/client/compose/compose.html +52 -0
- package/client/compose/compose.js +1289 -0
- package/client/compose/compose.js.map +1 -0
- package/client/compose/compose.ts +1231 -0
- package/client/compose/editor.js +616 -0
- package/client/compose/editor.js.map +1 -0
- package/client/compose/editor.ts +599 -0
- package/client/compose/ghost-text.js +122 -0
- package/client/compose/ghost-text.js.map +1 -0
- package/client/compose/ghost-text.ts +140 -0
- package/client/favicon.svg +11 -0
- package/client/icon.ico +0 -0
- package/client/icon.png +0 -0
- package/client/index.html +230 -0
- package/client/lib/android-bootstrap.js +9 -0
- package/client/lib/android-bootstrap.js.map +1 -0
- package/client/lib/android-bootstrap.ts +9 -0
- package/client/lib/api-client.js +378 -0
- package/client/lib/api-client.js.map +1 -0
- package/client/lib/api-client.ts +439 -0
- package/client/lib/local-service.js +603 -0
- package/client/lib/local-service.js.map +1 -0
- package/client/lib/local-service.ts +646 -0
- package/client/lib/local-store.js +214 -0
- package/client/lib/local-store.js.map +1 -0
- package/client/lib/local-store.ts +283 -0
- package/client/lib/mailxapi.js +304 -0
- package/client/lib/message-state.js +132 -0
- package/client/lib/message-state.js.map +1 -0
- package/client/lib/message-state.ts +160 -0
- package/client/package.json +16 -0
- package/client/styles/components.css +2049 -0
- package/client/styles/layout.css +332 -0
- package/client/styles/variables.css +85 -0
- package/client/tsconfig.json +19 -0
- package/package.json +124 -0
- package/packages/mailx-api/.gitattributes +10 -0
- package/packages/mailx-api/index.d.ts +10 -0
- package/packages/mailx-api/index.d.ts.map +1 -0
- package/packages/mailx-api/index.js +322 -0
- package/packages/mailx-api/index.js.map +1 -0
- package/packages/mailx-api/index.ts +283 -0
- package/packages/mailx-api/package.json +27 -0
- package/packages/mailx-api/tsconfig.json +9 -0
- package/packages/mailx-api/tsconfig.tsbuildinfo +1 -0
- package/packages/mailx-compose/.gitattributes +10 -0
- package/packages/mailx-compose/index.d.ts +21 -0
- package/packages/mailx-compose/index.d.ts.map +1 -0
- package/packages/mailx-compose/index.js +61 -0
- package/packages/mailx-compose/index.js.map +1 -0
- package/packages/mailx-compose/index.ts +85 -0
- package/packages/mailx-compose/package.json +18 -0
- package/packages/mailx-compose/tsconfig.json +9 -0
- package/packages/mailx-core/index.d.ts +139 -0
- package/packages/mailx-core/index.d.ts.map +1 -0
- package/packages/mailx-core/index.js +403 -0
- package/packages/mailx-core/index.js.map +1 -0
- package/packages/mailx-core/index.ts +424 -0
- package/packages/mailx-core/ipc.d.ts +13 -0
- package/packages/mailx-core/ipc.d.ts.map +1 -0
- package/packages/mailx-core/ipc.js +56 -0
- package/packages/mailx-core/ipc.js.map +1 -0
- package/packages/mailx-core/ipc.ts +62 -0
- package/packages/mailx-core/package.json +18 -0
- package/packages/mailx-core/tsconfig.json +9 -0
- package/packages/mailx-host/.gitattributes +10 -0
- package/packages/mailx-host/index.d.ts +21 -0
- package/packages/mailx-host/index.d.ts.map +1 -0
- package/packages/mailx-host/index.js +29 -0
- package/packages/mailx-host/index.js.map +1 -0
- package/packages/mailx-host/index.ts +38 -0
- package/packages/mailx-host/package.json +23 -0
- package/packages/mailx-host/tsconfig.json +9 -0
- package/packages/mailx-host/types-shim.d.ts +14 -0
- package/packages/mailx-imap/.gitattributes +10 -0
- package/packages/mailx-imap/index.d.ts +442 -0
- package/packages/mailx-imap/index.d.ts.map +1 -0
- package/packages/mailx-imap/index.js +3684 -0
- package/packages/mailx-imap/index.js.map +1 -0
- package/packages/mailx-imap/index.ts +3652 -0
- package/packages/mailx-imap/package-lock.json +131 -0
- package/packages/mailx-imap/package.json +28 -0
- package/packages/mailx-imap/providers/gmail-api.d.ts +8 -0
- package/packages/mailx-imap/providers/gmail-api.d.ts.map +1 -0
- package/packages/mailx-imap/providers/gmail-api.js +8 -0
- package/packages/mailx-imap/providers/gmail-api.js.map +1 -0
- package/packages/mailx-imap/providers/gmail-api.ts +8 -0
- package/packages/mailx-imap/providers/outlook-api.ts +7 -0
- package/packages/mailx-imap/providers/types.d.ts +9 -0
- package/packages/mailx-imap/providers/types.d.ts.map +1 -0
- package/packages/mailx-imap/providers/types.js +9 -0
- package/packages/mailx-imap/providers/types.js.map +1 -0
- package/packages/mailx-imap/providers/types.ts +9 -0
- package/packages/mailx-imap/tsconfig.json +9 -0
- package/packages/mailx-imap/tsconfig.tsbuildinfo +1 -0
- package/packages/mailx-send/.gitattributes +10 -0
- package/packages/mailx-send/README.md +217 -0
- package/packages/mailx-send/cli-queue.d.ts +11 -0
- package/packages/mailx-send/cli-queue.d.ts.map +1 -0
- package/packages/mailx-send/cli-queue.js +59 -0
- package/packages/mailx-send/cli-queue.js.map +1 -0
- package/packages/mailx-send/cli-queue.ts +62 -0
- package/packages/mailx-send/cli-send.d.ts +17 -0
- package/packages/mailx-send/cli-send.d.ts.map +1 -0
- package/packages/mailx-send/cli-send.js +75 -0
- package/packages/mailx-send/cli-send.js.map +1 -0
- package/packages/mailx-send/cli-send.ts +83 -0
- package/packages/mailx-send/cli.d.ts +22 -0
- package/packages/mailx-send/cli.d.ts.map +1 -0
- package/packages/mailx-send/cli.js +115 -0
- package/packages/mailx-send/cli.js.map +1 -0
- package/packages/mailx-send/cli.ts +126 -0
- package/packages/mailx-send/index.d.ts +77 -0
- package/packages/mailx-send/index.d.ts.map +1 -0
- package/packages/mailx-send/index.js +264 -0
- package/packages/mailx-send/index.js.map +1 -0
- package/packages/mailx-send/index.ts +333 -0
- package/packages/mailx-send/mailsend/README.md +133 -0
- package/packages/mailx-send/mailsend/cli.d.ts +12 -0
- package/packages/mailx-send/mailsend/cli.d.ts.map +1 -0
- package/packages/mailx-send/mailsend/cli.js +70 -0
- package/packages/mailx-send/mailsend/cli.js.map +1 -0
- package/packages/mailx-send/mailsend/cli.ts +81 -0
- package/packages/mailx-send/mailsend/index.d.ts +77 -0
- package/packages/mailx-send/mailsend/index.d.ts.map +1 -0
- package/packages/mailx-send/mailsend/index.js +264 -0
- package/packages/mailx-send/mailsend/index.js.map +1 -0
- package/packages/mailx-send/mailsend/index.ts +333 -0
- package/packages/mailx-send/mailsend/package-lock.json +65 -0
- package/packages/mailx-send/mailsend/package.json +26 -0
- package/packages/mailx-send/mailsend/tsconfig.json +21 -0
- package/packages/mailx-send/package-lock.json +65 -0
- package/packages/mailx-send/package.json +37 -0
- package/packages/mailx-send/tsconfig.json +21 -0
- package/packages/mailx-server/.gitattributes +10 -0
- package/packages/mailx-server/index.d.ts +8 -0
- package/packages/mailx-server/index.d.ts.map +1 -0
- package/packages/mailx-server/index.js +397 -0
- package/packages/mailx-server/index.js.map +1 -0
- package/packages/mailx-server/index.ts +429 -0
- package/packages/mailx-server/package.json +28 -0
- package/packages/mailx-server/tsconfig.json +9 -0
- package/packages/mailx-server/tsconfig.tsbuildinfo +1 -0
- package/packages/mailx-service/google-sync.d.ts +96 -0
- package/packages/mailx-service/google-sync.d.ts.map +1 -0
- package/packages/mailx-service/google-sync.js +153 -0
- package/packages/mailx-service/google-sync.js.map +1 -0
- package/packages/mailx-service/google-sync.ts +238 -0
- package/packages/mailx-service/index.d.ts +366 -0
- package/packages/mailx-service/index.d.ts.map +1 -0
- package/packages/mailx-service/index.js +2589 -0
- package/packages/mailx-service/index.js.map +1 -0
- package/packages/mailx-service/index.ts +2512 -0
- package/packages/mailx-service/jsonrpc.d.ts +25 -0
- package/packages/mailx-service/jsonrpc.d.ts.map +1 -0
- package/packages/mailx-service/jsonrpc.js +238 -0
- package/packages/mailx-service/jsonrpc.js.map +1 -0
- package/packages/mailx-service/jsonrpc.ts +268 -0
- package/packages/mailx-service/package.json +22 -0
- package/packages/mailx-service/tsconfig.json +9 -0
- package/packages/mailx-settings/.gitattributes +10 -0
- package/packages/mailx-settings/cloud.d.ts +47 -0
- package/packages/mailx-settings/cloud.d.ts.map +1 -0
- package/packages/mailx-settings/cloud.js +408 -0
- package/packages/mailx-settings/cloud.js.map +1 -0
- package/packages/mailx-settings/cloud.ts +393 -0
- package/packages/mailx-settings/index.d.ts +140 -0
- package/packages/mailx-settings/index.d.ts.map +1 -0
- package/packages/mailx-settings/index.js +872 -0
- package/packages/mailx-settings/index.js.map +1 -0
- package/packages/mailx-settings/index.ts +908 -0
- package/packages/mailx-settings/package.json +20 -0
- package/packages/mailx-settings/tsconfig.json +9 -0
- package/packages/mailx-settings/tsconfig.tsbuildinfo +1 -0
- package/packages/mailx-store/.gitattributes +10 -0
- package/packages/mailx-store/db.d.ts +346 -0
- package/packages/mailx-store/db.d.ts.map +1 -0
- package/packages/mailx-store/db.js +1796 -0
- package/packages/mailx-store/db.js.map +1 -0
- package/packages/mailx-store/db.ts +2007 -0
- package/packages/mailx-store/file-store.d.ts +36 -0
- package/packages/mailx-store/file-store.d.ts.map +1 -0
- package/packages/mailx-store/file-store.js +80 -0
- package/packages/mailx-store/file-store.js.map +1 -0
- package/packages/mailx-store/file-store.ts +82 -0
- package/packages/mailx-store/index.d.ts +7 -0
- package/packages/mailx-store/index.d.ts.map +1 -0
- package/packages/mailx-store/index.js +7 -0
- package/packages/mailx-store/index.js.map +1 -0
- package/packages/mailx-store/index.ts +7 -0
- package/packages/mailx-store/package.json +19 -0
- package/packages/mailx-store/tsconfig.json +9 -0
- package/packages/mailx-store/tsconfig.tsbuildinfo +1 -0
- package/packages/mailx-store-web/android-bootstrap.d.ts +16 -0
- package/packages/mailx-store-web/android-bootstrap.d.ts.map +1 -0
- package/packages/mailx-store-web/android-bootstrap.js +1247 -0
- package/packages/mailx-store-web/android-bootstrap.js.map +1 -0
- package/packages/mailx-store-web/android-bootstrap.ts +1262 -0
- package/packages/mailx-store-web/db.d.ts +132 -0
- package/packages/mailx-store-web/db.d.ts.map +1 -0
- package/packages/mailx-store-web/db.js +642 -0
- package/packages/mailx-store-web/db.js.map +1 -0
- package/packages/mailx-store-web/db.ts +756 -0
- package/packages/mailx-store-web/gmail-api-web.d.ts +11 -0
- package/packages/mailx-store-web/gmail-api-web.d.ts.map +1 -0
- package/packages/mailx-store-web/gmail-api-web.js +11 -0
- package/packages/mailx-store-web/gmail-api-web.js.map +1 -0
- package/packages/mailx-store-web/gmail-api-web.ts +11 -0
- package/packages/mailx-store-web/imap-web-provider.d.ts +33 -0
- package/packages/mailx-store-web/imap-web-provider.d.ts.map +1 -0
- package/packages/mailx-store-web/imap-web-provider.js +140 -0
- package/packages/mailx-store-web/imap-web-provider.js.map +1 -0
- package/packages/mailx-store-web/imap-web-provider.ts +156 -0
- package/packages/mailx-store-web/index.d.ts +10 -0
- package/packages/mailx-store-web/index.d.ts.map +1 -0
- package/packages/mailx-store-web/index.js +10 -0
- package/packages/mailx-store-web/index.js.map +1 -0
- package/packages/mailx-store-web/index.ts +10 -0
- package/packages/mailx-store-web/main-thread-host.d.ts +15 -0
- package/packages/mailx-store-web/main-thread-host.d.ts.map +1 -0
- package/packages/mailx-store-web/main-thread-host.js +292 -0
- package/packages/mailx-store-web/main-thread-host.js.map +1 -0
- package/packages/mailx-store-web/main-thread-host.ts +322 -0
- package/packages/mailx-store-web/package.json +23 -0
- package/packages/mailx-store-web/provider-types.d.ts +7 -0
- package/packages/mailx-store-web/provider-types.d.ts.map +1 -0
- package/packages/mailx-store-web/provider-types.js +7 -0
- package/packages/mailx-store-web/provider-types.js.map +1 -0
- package/packages/mailx-store-web/provider-types.ts +7 -0
- package/packages/mailx-store-web/sql-wasm-esm.js +10 -0
- package/packages/mailx-store-web/sql.js.d.ts +29 -0
- package/packages/mailx-store-web/sync-manager.d.ts +68 -0
- package/packages/mailx-store-web/sync-manager.d.ts.map +1 -0
- package/packages/mailx-store-web/sync-manager.js +506 -0
- package/packages/mailx-store-web/sync-manager.js.map +1 -0
- package/packages/mailx-store-web/sync-manager.ts +508 -0
- package/packages/mailx-store-web/tsconfig.json +10 -0
- package/packages/mailx-store-web/web-jsonrpc.d.ts +20 -0
- package/packages/mailx-store-web/web-jsonrpc.d.ts.map +1 -0
- package/packages/mailx-store-web/web-jsonrpc.js +102 -0
- package/packages/mailx-store-web/web-jsonrpc.js.map +1 -0
- package/packages/mailx-store-web/web-jsonrpc.ts +116 -0
- package/packages/mailx-store-web/web-message-store.d.ts +16 -0
- package/packages/mailx-store-web/web-message-store.d.ts.map +1 -0
- package/packages/mailx-store-web/web-message-store.js +89 -0
- package/packages/mailx-store-web/web-message-store.js.map +1 -0
- package/packages/mailx-store-web/web-message-store.ts +97 -0
- package/packages/mailx-store-web/web-service.d.ts +111 -0
- package/packages/mailx-store-web/web-service.d.ts.map +1 -0
- package/packages/mailx-store-web/web-service.js +542 -0
- package/packages/mailx-store-web/web-service.js.map +1 -0
- package/packages/mailx-store-web/web-service.ts +616 -0
- package/packages/mailx-store-web/web-settings.d.ts +83 -0
- package/packages/mailx-store-web/web-settings.d.ts.map +1 -0
- package/packages/mailx-store-web/web-settings.js +491 -0
- package/packages/mailx-store-web/web-settings.js.map +1 -0
- package/packages/mailx-store-web/web-settings.ts +522 -0
- package/packages/mailx-store-web/worker-bundle.js +6838 -0
- package/packages/mailx-store-web/worker-entry.d.ts +8 -0
- package/packages/mailx-store-web/worker-entry.d.ts.map +1 -0
- package/packages/mailx-store-web/worker-entry.js +187 -0
- package/packages/mailx-store-web/worker-entry.js.map +1 -0
- package/packages/mailx-store-web/worker-entry.ts +215 -0
- package/packages/mailx-store-web/worker-tcp-transport.d.ts +28 -0
- package/packages/mailx-store-web/worker-tcp-transport.d.ts.map +1 -0
- package/packages/mailx-store-web/worker-tcp-transport.js +98 -0
- package/packages/mailx-store-web/worker-tcp-transport.js.map +1 -0
- package/packages/mailx-store-web/worker-tcp-transport.ts +101 -0
- package/packages/mailx-types/.gitattributes +10 -0
- package/packages/mailx-types/index.d.ts +319 -0
- package/packages/mailx-types/index.d.ts.map +1 -0
- package/packages/mailx-types/index.js +243 -0
- package/packages/mailx-types/index.js.map +1 -0
- package/packages/mailx-types/index.ts +498 -0
- package/packages/mailx-types/package.json +16 -0
- package/packages/mailx-types/tsconfig.json +9 -0
- package/packages/mailx-types/tsconfig.tsbuildinfo +1 -0
- package/todo.json +13 -0
- package/tsconfig.base.json +31 -0
- package/tsconfig.json +9 -0
package/README.md
ADDED
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
# mailx -- Email Client
|
|
2
|
+
|
|
3
|
+
A local-first email client with IMAP sync, full offline reading, and a standalone native app. Replaces Thunderbird/Outlook.
|
|
4
|
+
|
|
5
|
+
> **Disclaimer:** This is a personal project written for my own use. I provide it as-is with no promises of support, stability, or fitness for any particular purpose. Use at your own risk.
|
|
6
|
+
|
|
7
|
+
MIT License -- Copyright (c) 2026 Bob Frankston
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @bobfrankston/mailx
|
|
13
|
+
mailx
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires Node.js 22 or later.
|
|
17
|
+
|
|
18
|
+
The package installs two equivalent commands: **`mailx`** and **`bobmail`**. They're the same binary — `bobmail` is provided as an alternative for environments where `mailx` collides with another tool (most commonly the BSD `mailx`/Heirloom mailx at `/usr/bin/mailx` on macOS and some Linux distributions). Use whichever name doesn't conflict on your system.
|
|
19
|
+
|
|
20
|
+
On Windows, the native WebView2 app launches automatically via IPC (no HTTP server needed). Use `mailx --server` for browser mode at `http://127.0.0.1:9333`.
|
|
21
|
+
|
|
22
|
+
## First-Time Setup
|
|
23
|
+
|
|
24
|
+
On first run, mailx shows a setup form. Enter your name and email address.
|
|
25
|
+
|
|
26
|
+
### Gmail / Google Workspace
|
|
27
|
+
|
|
28
|
+
No password needed. mailx detects Gmail via MX records, opens a browser for OAuth2 sign-in, and auto-configures Google Drive for settings sync. Custom domains hosted on Google Workspace are detected automatically.
|
|
29
|
+
|
|
30
|
+
### Outlook / Hotmail / Live
|
|
31
|
+
|
|
32
|
+
No password needed. OAuth2 sign-in opens in your browser.
|
|
33
|
+
|
|
34
|
+
### Yahoo
|
|
35
|
+
|
|
36
|
+
Use an **app password** (not your regular password):
|
|
37
|
+
1. Go to **Yahoo Account Settings** > **Account Security**
|
|
38
|
+
2. Click **Generate app password**
|
|
39
|
+
3. Paste the generated password into mailx
|
|
40
|
+
|
|
41
|
+
### AOL
|
|
42
|
+
|
|
43
|
+
Use an **app password**:
|
|
44
|
+
1. Go to **AOL Account Settings** > **Account Security**
|
|
45
|
+
2. Click **Generate app password**
|
|
46
|
+
3. Paste the generated password into mailx
|
|
47
|
+
|
|
48
|
+
### iCloud
|
|
49
|
+
|
|
50
|
+
Use an **app-specific password**:
|
|
51
|
+
1. Go to [appleid.apple.com](https://appleid.apple.com) > **Sign-In and Security**
|
|
52
|
+
2. Click **App-Specific Passwords** > **Generate**
|
|
53
|
+
3. Paste the generated password into mailx
|
|
54
|
+
|
|
55
|
+
### Other Providers (Dovecot, Fastmail, etc.)
|
|
56
|
+
|
|
57
|
+
Enter your IMAP password. mailx auto-detects server settings via MX records and DNS. If detection fails, use **Manual setup (advanced)** in the setup form, or create an accounts file and import it (see below).
|
|
58
|
+
|
|
59
|
+
### Adding Accounts via File
|
|
60
|
+
|
|
61
|
+
You can create an `accounts.jsonc` file and import it into mailx. This is useful for adding accounts that aren't easily configured through the setup form (custom IMAP servers, non-standard ports, etc.).
|
|
62
|
+
|
|
63
|
+
**Step 1.** Create a file (e.g., `my-accounts.jsonc`) with your account(s):
|
|
64
|
+
|
|
65
|
+
```jsonc
|
|
66
|
+
{
|
|
67
|
+
"accounts": [
|
|
68
|
+
{
|
|
69
|
+
"email": "you@example.com",
|
|
70
|
+
"name": "Your Name",
|
|
71
|
+
"label": "Work", // Display name in folder tree
|
|
72
|
+
"imap": {
|
|
73
|
+
"host": "imap.example.com", // IMAP server hostname
|
|
74
|
+
"port": 993, // 993 for TLS (default)
|
|
75
|
+
"tls": true,
|
|
76
|
+
"user": "you@example.com", // IMAP username (default: email)
|
|
77
|
+
"password": "your-password"
|
|
78
|
+
},
|
|
79
|
+
"smtp": {
|
|
80
|
+
"host": "smtp.example.com", // SMTP server hostname
|
|
81
|
+
"port": 587, // 587 for STARTTLS (default)
|
|
82
|
+
"tls": true,
|
|
83
|
+
"user": "you@example.com",
|
|
84
|
+
"password": "your-password"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
For known providers, most fields are optional:
|
|
92
|
+
|
|
93
|
+
```jsonc
|
|
94
|
+
{
|
|
95
|
+
"accounts": [
|
|
96
|
+
{ "email": "you@gmail.com", "name": "Your Name" },
|
|
97
|
+
{ "email": "you@yahoo.com", "name": "Your Name", "password": "app-password-here" },
|
|
98
|
+
{
|
|
99
|
+
"email": "you@yourserver.com",
|
|
100
|
+
"name": "Your Name",
|
|
101
|
+
"label": "Personal",
|
|
102
|
+
"imap": { "host": "imap.yourserver.com", "user": "you", "password": "pass" },
|
|
103
|
+
"smtp": { "host": "smtp.yourserver.com", "user": "you", "password": "pass" }
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Step 2.** Import into mailx:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
mailx --import my-accounts.jsonc
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This merges the accounts into your Google Drive settings (deduplicates by email address). Existing accounts are preserved.
|
|
116
|
+
|
|
117
|
+
### Gmail OAuth Prerequisites
|
|
118
|
+
|
|
119
|
+
Gmail OAuth requires a one-time Google Cloud setup:
|
|
120
|
+
1. Go to [Google Cloud Console](https://console.cloud.google.com/) and create a project
|
|
121
|
+
2. Enable the **Gmail API** (and **People API** for contacts)
|
|
122
|
+
3. Create **OAuth 2.0 credentials** (Desktop app type)
|
|
123
|
+
4. Download `credentials.json` to the iflow package directory
|
|
124
|
+
5. First connection opens a browser for consent. Tokens refresh automatically.
|
|
125
|
+
|
|
126
|
+
## Usage
|
|
127
|
+
|
|
128
|
+
### Layout
|
|
129
|
+
|
|
130
|
+
A vertical **icon rail** sits on the far left (Thunderbird / Dovecot style) with one-click access to Compose, Inbox, All Inboxes, and Settings; Calendar / Tasks / Contacts slots are placeholders until those features land. The rail is always visible on wide and medium screens; it folds into the hamburger menu on narrow ones.
|
|
131
|
+
|
|
132
|
+
### Reading Mail
|
|
133
|
+
|
|
134
|
+
- Click a **folder** to see its messages
|
|
135
|
+
- Click a **message** to read it in the preview pane
|
|
136
|
+
- **All Inboxes** combines inboxes from all accounts (appears with 2+ accounts)
|
|
137
|
+
- A small filled teal dot before the date means the message body is downloaded locally (offline-ready); a hollow circle means not yet prefetched. Prefetch runs as a background task every ~60 s independent of folder sync.
|
|
138
|
+
- Unread counts show on folders; sub-folder counts bubble up to collapsed parents
|
|
139
|
+
- Use the **folder search** box to find folders by name
|
|
140
|
+
|
|
141
|
+
### Composing
|
|
142
|
+
|
|
143
|
+
- **Ctrl+N** -- New message
|
|
144
|
+
- **Ctrl+R** -- Reply
|
|
145
|
+
- **Ctrl+Shift+R** -- Reply All
|
|
146
|
+
- **Ctrl+F** -- Forward
|
|
147
|
+
- From dropdown lets you pick which account to send from; reply auto-detects which identity to reply from based on which of your addresses the mail was sent to
|
|
148
|
+
- Contact autocomplete searches Google Contacts as you type in To/Cc/Bcc
|
|
149
|
+
- **Cc / Bcc** are hidden by default — click the toggle buttons next to To to show them
|
|
150
|
+
- **Attach** opens a file picker; attachments show as chips with remove buttons
|
|
151
|
+
- Drafts auto-save 1.5s after you stop typing, plus a 5s safety-net interval, plus on window close
|
|
152
|
+
- Compose window close asks Save / Discard / Cancel if there's content
|
|
153
|
+
- Address validation (`local@domain.tld`) runs on To/Cc/Bcc/From before sending — invalid addresses are refused
|
|
154
|
+
- **Editor shortcuts**: Ctrl+K insert link, Ctrl+Shift+K remove link, Ctrl+Shift+X strikethrough, Ctrl+Shift+7/8 ordered/bullet list, Ctrl+]/[ indent/outdent, Ctrl+Shift+C color, Ctrl+\ clear formatting. Native spell-check via WebView2 (right-click to add to dictionary).
|
|
155
|
+
- **Link editor modal**: Ctrl+K opens a two-field dialog (text + URL) with Remove-link button; hovering any link in the editor shows a floating URL preview
|
|
156
|
+
- **Paste URL** auto-links: paste a bare URL over a selection and it wraps it, or paste into empty space to insert as a link
|
|
157
|
+
|
|
158
|
+
### Managing Messages
|
|
159
|
+
|
|
160
|
+
- **Delete** or **Ctrl+D** -- Delete selected messages (moves to Trash; second delete in Trash is a hard delete + EXPUNGE)
|
|
161
|
+
- **Ctrl+Z** -- Undo the last **delete or move** (whichever came last, 60s window)
|
|
162
|
+
- **Ctrl+A** -- Select all messages in the list
|
|
163
|
+
- **Drag and drop** -- Move messages to a folder by dragging them
|
|
164
|
+
- **Right-click a message → Move to folder…** -- Searchable folder picker; useful on narrow layouts where the folder tree is hidden
|
|
165
|
+
- Click the **star** column to flag/unflag a message
|
|
166
|
+
- **Unsubscribe** button appears when the message has a List-Unsubscribe header. One-click (RFC 8058) when the sender advertises `List-Unsubscribe-Post: List-Unsubscribe=One-Click`; otherwise opens the URL or a pre-filled compose for `mailto:` lists.
|
|
167
|
+
- **Right-click on a From/To/Cc address** -- Copy name, Copy address, Copy both, Add to contacts, or Reply/Reply All/Forward
|
|
168
|
+
- **Right-click in the message body → Translate** (opt-in) -- Uses the configured AI provider; select text first to translate just the selection. Off by default; enable under **Settings → AI translate**.
|
|
169
|
+
- **Preview pane zoom** -- Ctrl+wheel, Ctrl+= / Ctrl+- / Ctrl+0, or right-click menu (Zoom in/out/reset, Copy, Select all). Persisted across messages.
|
|
170
|
+
- **Cross-folder search results** show the folder name for each hit
|
|
171
|
+
- **Empty Trash / Empty Junk** -- Right-click the folder in the tree → Empty (confirmation prompt)
|
|
172
|
+
|
|
173
|
+
### Searching
|
|
174
|
+
|
|
175
|
+
Type in the search bar and press **Enter**. Use the dropdown to search:
|
|
176
|
+
- **All folders** -- Every account and folder
|
|
177
|
+
- **This folder** -- Current folder only (filters as you type, server search on Enter)
|
|
178
|
+
- **IMAP server** -- Server-side search (useful for messages older than your sync window)
|
|
179
|
+
|
|
180
|
+
Supports regex: wrap pattern in `/slashes/`.
|
|
181
|
+
|
|
182
|
+
### Folder Operations
|
|
183
|
+
|
|
184
|
+
Right-click a folder for options:
|
|
185
|
+
- Mark all read
|
|
186
|
+
- New subfolder
|
|
187
|
+
- Rename / Delete folder
|
|
188
|
+
- Empty (Trash and Junk only)
|
|
189
|
+
|
|
190
|
+
### View Options
|
|
191
|
+
|
|
192
|
+
Under **View** in the toolbar:
|
|
193
|
+
- **Two-line view** -- Show preview snippet below each subject
|
|
194
|
+
- **Preview pane** -- Toggle the message reader panel
|
|
195
|
+
- **Preview snippets** -- Show snippet text in message rows
|
|
196
|
+
- **Flagged only** -- Show only starred messages
|
|
197
|
+
- **Folder counts** -- Show total message counts on all folders
|
|
198
|
+
|
|
199
|
+
### Settings
|
|
200
|
+
|
|
201
|
+
Under **Settings** in the toolbar:
|
|
202
|
+
- **Editor** -- Choose between Quill (default) and tiptap for compose
|
|
203
|
+
- **AI autocomplete** -- Enable LLM-powered writing suggestions (Ollama, Claude, or OpenAI)
|
|
204
|
+
- **AI translate** -- Enable the right-click Translate item in the message viewer (off by default; uses the same provider as autocomplete)
|
|
205
|
+
- **AI proofread** -- Enable the proofread path (off by default; provider method available, UI wiring in progress)
|
|
206
|
+
|
|
207
|
+
All AI features are opt-in. Provider + API key live in the autocomplete settings; toggling a feature only controls whether that specific capability calls out to the provider.
|
|
208
|
+
|
|
209
|
+
### Keyboard Shortcuts
|
|
210
|
+
|
|
211
|
+
| Key | Action |
|
|
212
|
+
|-----|--------|
|
|
213
|
+
| Ctrl+N | New message |
|
|
214
|
+
| Ctrl+R | Reply |
|
|
215
|
+
| Ctrl+Shift+R | Reply All |
|
|
216
|
+
| Ctrl+F | Forward |
|
|
217
|
+
| Delete / Ctrl+D | Delete |
|
|
218
|
+
| Ctrl+Z | Undo last delete or move |
|
|
219
|
+
| Ctrl+A | Select all |
|
|
220
|
+
| F5 | Sync all folders |
|
|
221
|
+
| Escape | Clear search / close menus |
|
|
222
|
+
|
|
223
|
+
**In the compose editor:**
|
|
224
|
+
|
|
225
|
+
| Key | Action |
|
|
226
|
+
|-----|--------|
|
|
227
|
+
| Ctrl+K | Insert / edit link (opens dialog with text + URL fields) |
|
|
228
|
+
| Ctrl+Shift+K | Remove link |
|
|
229
|
+
| Ctrl+B / Ctrl+I / Ctrl+U | Bold / Italic / Underline |
|
|
230
|
+
| Ctrl+Shift+X | Strikethrough |
|
|
231
|
+
| Ctrl+Shift+7 / 8 | Ordered / Bullet list |
|
|
232
|
+
| Ctrl+] / Ctrl+[ | Indent / Outdent |
|
|
233
|
+
| Ctrl+Shift+C | Set text color |
|
|
234
|
+
| Ctrl+\ | Clear formatting |
|
|
235
|
+
| Ctrl+Enter | Send |
|
|
236
|
+
| Escape | Close (prompts Save / Discard / Cancel) |
|
|
237
|
+
|
|
238
|
+
**In the preview pane:**
|
|
239
|
+
|
|
240
|
+
| Key | Action |
|
|
241
|
+
|-----|--------|
|
|
242
|
+
| Ctrl+wheel | Zoom in/out |
|
|
243
|
+
| Ctrl+= / Ctrl+- | Zoom in / out |
|
|
244
|
+
| Ctrl+0 | Reset zoom |
|
|
245
|
+
| Delete | Delete message (also works with focus in preview) |
|
|
246
|
+
|
|
247
|
+
## Command Line
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
mailx Start the app (native window via IPC)
|
|
251
|
+
mailx --email <addr> First-time setup with this email (skips prompt)
|
|
252
|
+
mailx --verbose Show log output in terminal (default: log file only)
|
|
253
|
+
mailx --import <file> Import accounts.jsonc into Google Drive
|
|
254
|
+
mailx --server Start HTTP server for dev/remote (http://localhost:9333)
|
|
255
|
+
|
|
256
|
+
mailx -kill Kill running mailx processes + clean up WAL files
|
|
257
|
+
mailx -repair Re-sync message metadata (fix garbled subjects)
|
|
258
|
+
mailx -rebuild Wipe local cache and re-download everything from IMAP
|
|
259
|
+
mailx -setup Interactive first-time setup (CLI)
|
|
260
|
+
mailx -test Test IMAP/SMTP connectivity for all accounts
|
|
261
|
+
mailx -reauth Clear cached OAuth tokens; next start re-consents
|
|
262
|
+
mailx -v Show version
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### -repair vs -rebuild
|
|
266
|
+
|
|
267
|
+
**-repair** clears message metadata (subjects, flags, sender names) from the database but preserves your downloaded `.eml` message files. Folder sync state resets so mailx re-fetches all envelopes on next run. Use this when subjects show garbled characters.
|
|
268
|
+
|
|
269
|
+
**-rebuild** deletes the entire database and message store, then re-downloads everything from IMAP. Accounts and settings are preserved. Use this for a clean start or to reclaim disk space.
|
|
270
|
+
|
|
271
|
+
## Configuration
|
|
272
|
+
|
|
273
|
+
All config files live in `~/.mailx/` (on Windows: `C:\Users\You\.mailx\`).
|
|
274
|
+
|
|
275
|
+
### config.jsonc (per-machine, not synced)
|
|
276
|
+
|
|
277
|
+
Points to shared settings and controls local behavior. Created automatically for Gmail accounts.
|
|
278
|
+
|
|
279
|
+
```jsonc
|
|
280
|
+
{
|
|
281
|
+
"sharedDir": { "provider": "gdrive", "path": "mailx", "folderId": "..." },
|
|
282
|
+
"storePath": "C:/Users/You/.mailx/mailxstore",
|
|
283
|
+
"historyDays": 90,
|
|
284
|
+
"accountOverrides": {
|
|
285
|
+
"work": { "historyDays": 7 },
|
|
286
|
+
"archive": { "enabled": false }
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**sharedDir** can be:
|
|
292
|
+
- `{ "provider": "gdrive", "path": "mailx" }` -- Google Drive via API (auto-configured for Gmail)
|
|
293
|
+
- `"C:/Users/You/OneDrive/home/.mailx"` -- Local/network path
|
|
294
|
+
|
|
295
|
+
### accounts.jsonc (shared via Google Drive or local)
|
|
296
|
+
|
|
297
|
+
For known providers, only `email` is required -- IMAP/SMTP settings fill automatically.
|
|
298
|
+
|
|
299
|
+
```jsonc
|
|
300
|
+
{
|
|
301
|
+
"accounts": [
|
|
302
|
+
{ "email": "you@gmail.com", "name": "Your Name" },
|
|
303
|
+
{ "email": "you@icloud.com", "name": "Your Name", "password": "xxxx-xxxx-xxxx-xxxx" },
|
|
304
|
+
{
|
|
305
|
+
"email": "you@example.com",
|
|
306
|
+
"name": "Your Name",
|
|
307
|
+
"label": "Work",
|
|
308
|
+
"spam": "_spam", // Optional: enables the ⚠ Spam button in the viewer toolbar
|
|
309
|
+
"imap": { "host": "imap.example.com", "port": 993, "tls": true, "user": "you", "password": "..." },
|
|
310
|
+
"smtp": { "host": "smtp.example.com", "port": 587, "tls": true, "user": "you", "password": "..." }
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Optional per-account fields:**
|
|
317
|
+
|
|
318
|
+
| Field | Type | Purpose |
|
|
319
|
+
|-------|------|---------|
|
|
320
|
+
| `spam` | string | IMAP folder path to send messages when the **Spam** (⚠) button is pressed. The button is hidden until this is set. Use the exact folder path on the server (e.g., `"_spam"`, `"INBOX/Spam"`, `"[Gmail]/Spam"`). |
|
|
321
|
+
| `label` | string | Display name in the folder tree (overrides auto-detected). |
|
|
322
|
+
| `defaultSend` | bool | Use this account's SMTP when From doesn't match any account. |
|
|
323
|
+
| `relayDomains` | string[] | Domains to skip in Delivered-To chain (e.g., `["m.connectivity.xyz"]`). |
|
|
324
|
+
| `deliveredToPrefix` | string[] | Strip these prefixes from Delivered-To to recover the clean alias (e.g., `["bobf-ma-", "bobf-"]` — order matters, longest first). |
|
|
325
|
+
| `identityDomains` | string[] | Domains where Delivered-To becomes the reply From (e.g., `["bob.ma"]`). |
|
|
326
|
+
|
|
327
|
+
**Auto-detected providers:**
|
|
328
|
+
|
|
329
|
+
| Domain | IMAP | SMTP | Auth | Label |
|
|
330
|
+
|--------|------|------|------|-------|
|
|
331
|
+
| gmail.com | imap.gmail.com:993 | smtp.gmail.com:587 | OAuth2 | Gmail |
|
|
332
|
+
| outlook.com, hotmail.com | outlook.office365.com:993 | smtp.office365.com:587 | OAuth2 | Outlook |
|
|
333
|
+
| yahoo.com | imap.mail.yahoo.com:993 | smtp.mail.yahoo.com:587 | App password | Yahoo |
|
|
334
|
+
| aol.com | imap.aol.com:993 | smtp.aol.com:587 | App password | AOL |
|
|
335
|
+
| icloud.com | imap.mail.me.com:993 | smtp.mail.me.com:587 | App password | iCloud |
|
|
336
|
+
|
|
337
|
+
Google Workspace and Microsoft 365 custom domains are detected automatically via MX records.
|
|
338
|
+
|
|
339
|
+
### preferences.jsonc (shared)
|
|
340
|
+
|
|
341
|
+
```jsonc
|
|
342
|
+
{
|
|
343
|
+
"ui": { "theme": "dark", "editor": "quill", "fontSize": 15 },
|
|
344
|
+
"sync": { "intervalMinutes": 5, "historyDays": 30 },
|
|
345
|
+
"autocomplete": {
|
|
346
|
+
"enabled": false,
|
|
347
|
+
"provider": "ollama",
|
|
348
|
+
"ollamaUrl": "http://localhost:11434",
|
|
349
|
+
"ollamaModel": "qwen2.5-coder:1.5b"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### allowlist.jsonc (shared)
|
|
355
|
+
|
|
356
|
+
Remote content (images, tracking pixels) is blocked by default. Whitelist trusted senders:
|
|
357
|
+
|
|
358
|
+
```jsonc
|
|
359
|
+
{
|
|
360
|
+
"senders": ["boss@example.com"],
|
|
361
|
+
"domains": ["example.com"],
|
|
362
|
+
"recipients": ["team@our-group.com"]
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Multi-Machine Setup
|
|
367
|
+
|
|
368
|
+
Settings sync via Google Drive API. Each machine has its own `config.jsonc`:
|
|
369
|
+
|
|
370
|
+
**Desktop** (full history):
|
|
371
|
+
```jsonc
|
|
372
|
+
{ "sharedDir": { "provider": "gdrive", "path": "mailx" }, "historyDays": 0 }
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**Laptop** (recent only):
|
|
376
|
+
```jsonc
|
|
377
|
+
{ "sharedDir": { "provider": "gdrive", "path": "mailx" }, "historyDays": 30,
|
|
378
|
+
"accountOverrides": { "archive": { "enabled": false } } }
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Both machines share accounts, preferences, and allowlist via Google Drive.
|
|
382
|
+
|
|
383
|
+
## Data Storage
|
|
384
|
+
|
|
385
|
+
| Path | Synced? | Purpose |
|
|
386
|
+
|------|---------|---------|
|
|
387
|
+
| config.jsonc | No | Local config pointer + overrides |
|
|
388
|
+
| accounts.jsonc | Yes | IMAP/SMTP account configs |
|
|
389
|
+
| preferences.jsonc | Yes | UI and sync settings |
|
|
390
|
+
| allowlist.jsonc | Yes | Remote content allow-list |
|
|
391
|
+
| mailx.db | No | SQLite metadata (headers, contacts, sync state) |
|
|
392
|
+
| mailxstore/ | No | Cached message bodies (.eml per message) |
|
|
393
|
+
| logs/ | No | Daily log files |
|
|
394
|
+
|
|
395
|
+
**Safe to delete:** mailxstore/ (re-downloaded on sync), mailx.db (re-created on startup), logs/ (anytime).
|
|
396
|
+
|
|
397
|
+
## Logs
|
|
398
|
+
|
|
399
|
+
Daily log files: `~/.mailx/logs/mailx-YYYY-MM-DD.log`
|
|
400
|
+
|
|
401
|
+
Use `mailx --verbose` to see logs in the terminal instead.
|
|
402
|
+
|
|
403
|
+
## Troubleshooting
|
|
404
|
+
|
|
405
|
+
**Blank window or no response** -- Run `mailx -kill` then `mailx` to restart.
|
|
406
|
+
|
|
407
|
+
**OAuth timeout** -- If the browser auth window doesn't appear or times out (5 minutes), close mailx and try again.
|
|
408
|
+
|
|
409
|
+
**Garbled subjects** -- Run `mailx -repair` to re-sync metadata from IMAP.
|
|
410
|
+
|
|
411
|
+
**Sync stuck or corrupt data** -- Run `mailx -rebuild` for a clean start. Accounts and settings are preserved.
|
|
412
|
+
|
|
413
|
+
**"Too many connections"** -- mailx uses up to 5 IMAP connections per account. Close other email clients if you hit your server's limit.
|
|
414
|
+
|
|
415
|
+
**App password rejected (Yahoo/AOL/iCloud)** -- Make sure you're using an app-specific password, not your regular login. Generate a new one from your account security settings.
|
|
416
|
+
|
|
417
|
+
## Architecture
|
|
418
|
+
|
|
419
|
+
- **IPC-first** -- Default mode uses msger (Rust/WebView2) with bidirectional IPC. No TCP server, no CLOSE_WAIT zombies.
|
|
420
|
+
- **Host abstraction** -- mailx talks to the WebView host through `@bobfrankston/mailx-host`, which picks msger (default) or msgview (Electron, planned for Mac and niche Linux) at runtime. Override with `MAILX_HOST=msger|msgview`.
|
|
421
|
+
- **HTTP fallback** -- `--server` flag starts Express for browser/remote access.
|
|
422
|
+
- **Local-first** -- Changes update local DB immediately; background worker syncs to IMAP.
|
|
423
|
+
- **Offline reading** -- Full message bodies cached as .eml files.
|
|
424
|
+
- **IMAP IDLE** -- Instant new-mail notifications + periodic sync fallback.
|
|
425
|
+
- **Outbox** -- Queued in IMAP Outbox folder with multi-machine interlock via flags.
|
|
426
|
+
- **Remote content blocking** -- HTML sanitized server-side, CSP in iframe, per-sender allow-list.
|
|
427
|
+
- **Search** -- SQLite FTS5 full-text index + IMAP server search + regex filtering.
|
|
428
|
+
- **Connection management** -- Semaphore limits 5 connections per account; exponential backoff on server limits.
|
|
429
|
+
- **Cloud sync** -- Google Drive API for settings portability (no filesystem mount required).
|