proton-mail-bridge-client 2.1.27 → 2.1.29
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 +21 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/services/simple-imap-service.d.ts +3 -0
- package/dist/services/simple-imap-service.d.ts.map +1 -1
- package/dist/services/simple-imap-service.js +33 -6
- package/dist/services/simple-imap-service.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -377,6 +377,7 @@ Rules:
|
|
|
377
377
|
- For anything important or hard to walk back (a wide CC list, a sensitive topic, an attachment), offer a short undo window via send_email's undoWindowSeconds instead of sending immediately — remind me it only protects against mistakes noticed in the next few seconds, not a change of mind days later.
|
|
378
378
|
- Before calling delete_email, confirm with me — deletion is permanent.
|
|
379
379
|
- Prefer create_draft over send_email when composing from scratch.
|
|
380
|
+
- When revising a draft, change parts of it with update_draft's bodyEdits (find/replace) instead of resending the whole body, and pass syncToRemote:false while iterating; call sync_draft_to_remote once when I say the draft is ready. Each synced edit costs seconds (see "Performance and token cost").
|
|
380
381
|
- Use get_inbox_digest or get_actionable_threads as your starting point for triage sessions.
|
|
381
382
|
```
|
|
382
383
|
|
|
@@ -408,11 +409,17 @@ PROTONMAIL_TOOL_TIER=core # expose 25 core tools instead of all 96
|
|
|
408
409
|
PROTONMAIL_READ_ONLY=true # disable all write operations
|
|
409
410
|
PROTONMAIL_ALLOW_SEND=false # disable SMTP sends only (other writes still work)
|
|
410
411
|
PROTONMAIL_CONFIRM_DESTRUCTIVE=true # require confirmed:true on send, reply, forward, delete
|
|
412
|
+
PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF=true # every send may only go to your own address — the safe way to try the server
|
|
413
|
+
PROTONMAIL_ALLOW_EMPTY_FOLDER=true # enable empty_folder (off by default): permanently deletes ALL messages in a folder
|
|
411
414
|
PROTONMAIL_ALLOWED_ACTIONS='mark_read,archive,trash' # per-action allowlist
|
|
412
415
|
```
|
|
413
416
|
|
|
414
417
|
`batch_email_action` and `apply_thread_action` both support `dryRun: true` regardless of the above flags.
|
|
415
418
|
|
|
419
|
+
**Trying it safely: `PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF=true`.** With this on, the server can compose, draft, reply, forward and send for real, but every recipient (To, CC and BCC) must be your own Bridge login address; a `+tag` alias of it counts as yours. Anything else is refused with `RESTRICT_OUTBOUND_TO_SELF is enabled. Cannot send to: …` before any mail is built or queued. It covers `send_email`, `reply_to_email`, `reply_all_email`, `forward_email`, `send_draft`, `schedule_draft`, `send_test_email` and `unsubscribe_sender`, and it is checked again when a queued or scheduled send fires, so a send queued before you turned it on cannot slip out later. It does not stop the model from *writing* a message to someone else into a draft; it stops it from being sent.
|
|
420
|
+
|
|
421
|
+
**`PROTONMAIL_ALLOW_EMPTY_FOLDER`.** `empty_folder` deletes every message in a folder at once and cannot be undone, so it is switched off unless this is `true` (the call then fails with a message naming the variable). When enabled it still needs an explicit `confirmed: true` to delete: without it, it only returns a preview of what would be removed. For anything less than an entire folder use `bulk_delete`.
|
|
422
|
+
|
|
416
423
|
---
|
|
417
424
|
|
|
418
425
|
## Environment reference
|
|
@@ -427,6 +434,8 @@ PROTONMAIL_IMAP_SECURE='false'
|
|
|
427
434
|
PROTONMAIL_SMTP_HOST='127.0.0.1'
|
|
428
435
|
PROTONMAIL_SMTP_PORT='1025'
|
|
429
436
|
PROTONMAIL_SMTP_SECURE='true' # Bridge's local SMTP port requires implicit TLS from the first byte; set false only for a non-Bridge SMTP relay
|
|
437
|
+
PROTONMAIL_IMAP_USERNAME='' # optional: log in to IMAP as a different user than PROTONMAIL_USERNAME (default: the same). The send identity, and RESTRICT_OUTBOUND_TO_SELF, still use PROTONMAIL_USERNAME.
|
|
438
|
+
PROTONMAIL_IMAP_PASSWORD='' # optional: a different IMAP password than PROTONMAIL_PASSWORD (default: the same)
|
|
430
439
|
|
|
431
440
|
# Secrets via file or command (avoids raw credentials in config)
|
|
432
441
|
PROTONMAIL_USERNAME_FILE='/path/to/user.txt'
|
|
@@ -446,6 +455,9 @@ PROTONMAIL_ALLOW_SEND='true'
|
|
|
446
455
|
PROTONMAIL_ALLOW_REMOTE_DRAFT_SYNC='true'
|
|
447
456
|
PROTONMAIL_ALLOWED_ACTIONS='mark_read,mark_unread,star,unstar,archive,trash,restore,move,delete'
|
|
448
457
|
PROTONMAIL_CONFIRM_DESTRUCTIVE='false'
|
|
458
|
+
PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF='false' # true: sends may only go to your own Bridge login address (To, CC and BCC; +tag aliases count as yours); anything else is refused, and queued/scheduled sends are re-checked when they fire. Covers send_email, reply_to_email, reply_all_email, forward_email, send_draft, schedule_draft, send_test_email, unsubscribe_sender. The safest way to try the server.
|
|
459
|
+
PROTONMAIL_ALLOW_EMPTY_FOLDER='false' # true: enables empty_folder, which permanently deletes ALL messages in a folder (still needs confirmed:true; without it only a preview is returned). Off by default; use bulk_delete for a subset.
|
|
460
|
+
PROTONMAIL_ALLOW_UNSAFE_HTML='false' # HTML in outgoing mail is always sanitized (scripts, event handlers and remote images/beacons removed). A send that passes sanitizeHtml:false is IGNORED — still sanitized, with a warning logged — unless this is exactly 'true'. Leave it off unless you deliberately send raw HTML.
|
|
449
461
|
PROTONMAIL_SEND_DELAY_SECONDS='0' # >0: send_email, reply_to_email, reply_all_email and forward_email queue instead of sending immediately, cancelable via cancel_send (undoWindowSeconds overrides per call). send_draft is not delayed; use schedule_draft. Only fires while this server stays running.
|
|
450
462
|
PROTONMAIL_SIGNATURE='' # Plain text, appended to send_email/reply_to_email/reply_all_email/forward_email bodies (text + HTML), after your own text and before any quoted/forwarded content. Every send now goes out multipart (a plain-text send auto-gets an html alternative too), so the signature always gets its HTML treatment, not just the text/plain part. Opt out per-message with appendSignature: false. Never applied to send_draft/schedule_draft — draft content is already finalized.
|
|
451
463
|
#
|
|
@@ -457,10 +469,18 @@ PROTONMAIL_SIGNATURE='' # Plain text, appended to send_email/reply_
|
|
|
457
469
|
|
|
458
470
|
# Sync
|
|
459
471
|
PROTONMAIL_AUTO_SYNC='true'
|
|
472
|
+
PROTONMAIL_AUTO_SYNC_FOLDER='INBOX,Sent' # comma-separated folders the background sync keeps indexed
|
|
473
|
+
PROTONMAIL_AUTO_SYNC_FULL='false' # true: each background pass is a full sync (larger sample per folder, and messages moved/deleted elsewhere are pruned from the index) instead of incremental
|
|
474
|
+
PROTONMAIL_AUTO_SYNC_LIMIT_PER_FOLDER='100' # messages fetched per folder per background pass (1-500)
|
|
460
475
|
PROTONMAIL_STARTUP_SYNC='true'
|
|
461
476
|
PROTONMAIL_SYNC_INTERVAL_MINUTES='5'
|
|
462
477
|
PROTONMAIL_IDLE_WATCH='true'
|
|
463
478
|
PROTONMAIL_IDLE_MAX_SECONDS='30'
|
|
479
|
+
|
|
480
|
+
# Tuning and diagnostics
|
|
481
|
+
PROTONMAIL_OP_DELAY_MS='0' # minimum gap in ms between IMAP mailbox operations (0-5000); raise it to be gentler on a slow Bridge. 0 = no throttling
|
|
482
|
+
PROTONMAIL_DEBUG='false' # true: get_connection_status and run_doctor include the raw underlying connection error text (otherwise only a classified cause and suggestion)
|
|
483
|
+
PROTONMAIL_CLAUDE_RUNTIME_DIR='' # where the Claude Desktop installer puts its runtime copy (default: ~/Library/Application Support/Proton Mail Bridge Client on macOS, %APPDATA%\Proton Mail Bridge Client on Windows, ~/.local/share/proton-mail-bridge-client on Linux)
|
|
464
484
|
```
|
|
465
485
|
|
|
466
486
|
---
|
|
@@ -583,7 +603,7 @@ Bridge answers IMAP `SEARCH` itself, and its cost grows with folder size. That i
|
|
|
583
603
|
Drafts live in a local store first; the copy in Proton's Drafts folder is a separate upload.
|
|
584
604
|
|
|
585
605
|
- **Edit a long draft with `bodyEdits`, not by resending `body`.** `update_draft` takes `bodyEdits: [{find, replace}]` (optionally `all:true`) and changes just those fragments of the stored body: a two-sentence change to a ~14,000-character draft is a request of about 200 characters instead of about 14,000 (roughly 70 times smaller), and the model only has to write the words that change. Each `find` must match exactly once (add surrounding text, or set `all:true`); otherwise nothing is changed and the error says which edit failed and why. Edits apply in order, all-or-nothing, and match the stored text literally — for an HTML draft, the HTML source. Pass either `body` or `bodyEdits`, not both. The response reports `bodyEditsApplied`.
|
|
586
|
-
- **Each `update_draft` uploads the whole draft to the Drafts folder** (the full message, attachment bytes included — about 1.4 MB of MIME for a 1 MiB attachment) unless you pass `syncToRemote:false`.
|
|
606
|
+
- **Each `update_draft` uploads the whole draft to the Drafts folder** (the full message, attachment bytes included — about 1.4 MB of MIME for a 1 MiB attachment) unless you pass `syncToRemote:false`. That upload is the slow part, and it is Bridge's, not ours: on the reference mailbox a local edit takes 2–6 ms, the first sync of a draft about 1.5 s, and a later sync that *replaces* the previous remote copy about 3.5 s (upload ≈ 1.4 s, then Bridge deleting the old copy ≈ 2.1 s; Bridge does not replace a draft appended with the same Message-ID, so the delete is required). Sending a change as `bodyEdits` or as a full `body` costs the same on the server side; `bodyEdits` saves the model's tokens, not Bridge time. So when you are making several edits in a row, do them with `syncToRemote:false` and finish with one `sync_draft_to_remote` — six edits are then about 3.5 s of waiting instead of about 20 s.
|
|
587
607
|
- **The response stays small however big the draft is.** `create_draft`, the reply/forward/thread-reply draft creators, `update_draft` and `sync_draft_to_remote` return a body preview and attachment metadata only (an edit of a ~200 KB draft cost about 300 tokens; a draft with a 1 MiB attachment about 220–300). Only `get_draft` returns the full body and attachment content.
|
|
588
608
|
- **Nothing to do if nothing changed:** repeating an `update_draft` that changes nothing on an already-synced draft does no write and no upload.
|
|
589
609
|
- `list_drafts` is local and returns the 20 most recently updated (`hasMore`, `offset` to page); `list_remote_drafts` reads the Drafts folder over IMAP (about 15 ms for 79 drafts).
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,MAAM,EAAE,MAAM,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B,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,EACd,kBAAkB,CAAC,EAAE,MAAM,GAC1B,mBAAmB,EAAE,CA8CvB;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,mBAAmB,EAC3B,gBAAgB,EAAE,mBAAmB,EAAE,GACtC,mBAAmB,CAmBrB;AAWD,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,EAAE,GACjB,GAAG,CAAC,MAAM,GAAG,SAAS,EAAE;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAYvE;AAOD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAQ3G;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,EAAE,CAK/G;AAID,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,mBAAmB,CASpF;AAsQD,wBAAgB,kBAAkB,IAAI,gBAAgB,CAoGrD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE;IACP,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAm5IP;AAED,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmE1C"}
|
package/dist/index.js
CHANGED
|
@@ -3394,7 +3394,9 @@ export function buildConfigFromEnv() {
|
|
|
3394
3394
|
const opDelayMs = parseIntegerEnv("PROTONMAIL_OP_DELAY_MS", 0, 0, 5000);
|
|
3395
3395
|
const sendDelaySeconds = parseIntegerEnv("PROTONMAIL_SEND_DELAY_SECONDS", 0, 0, 300);
|
|
3396
3396
|
const smtpHost = process.env.PROTONMAIL_SMTP_HOST || "127.0.0.1";
|
|
3397
|
-
|
|
3397
|
+
// 127.0.0.1, not "localhost": Bridge listens on IPv4 loopback only, and "localhost" may
|
|
3398
|
+
// resolve to ::1 first (and matches what the README and the SMTP default already say).
|
|
3399
|
+
const imapHost = process.env.PROTONMAIL_IMAP_HOST || "127.0.0.1";
|
|
3398
3400
|
const imapSecure = parseBooleanEnv("PROTONMAIL_IMAP_SECURE", false);
|
|
3399
3401
|
const dataDir = process.env.PROTONMAIL_DATA_DIR?.trim() || join(homedir(), ".proton-mail-bridge-client");
|
|
3400
3402
|
if (dataDir && !isAbsolute(dataDir)) {
|