0.25.0: mail login, sign in to any provider that still takes a password - #49
Merged
Conversation
`mail login <provider|address> [address]` says which kind of password the host wants before asking for it — Gmail, Yahoo, AOL, iCloud, Fastmail and Yandex refuse the account password over IMAP and their refusal reads like a typo — then tries IMAP and SMTP and stores nothing on a refusal. The provider comes off the name, a webmail domain, or a custom domain's MX records, so a domain hosted at Google, Zoho, Fastmail, Proton, iCloud or Forward Email needs no --provider. Fifteen providers are built in (Forward Email, Gmail, Yahoo, AOL, iCloud, Fastmail, Zoho, Proton via its Bridge on localhost, GMX, Yandex, mail.com, Posteo, mailbox.org, Migadu, Purelymail); `mail providers` lists them with hosts, ports and the password rule. Outlook.com / Microsoft 365, Tuta and HEY are listed as unreachable with the reason, since Microsoft takes only OAuth2 now and the other two have no IMAP at all. Accounts gain imapSecure and insecureTls (IMAP STARTTLS and a self-signed bridge certificate, both needed for Proton), readable from the vault as _IMAP_SECURE / _INSECURE_TLS. The login-failure message names the fix per provider instead of only for Gmail. Plugin command /mail:login. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013h8jopY81BGQ4Pn22NfZTu
Version bump for the login work: the mail plugin goes to 0.2.0 with its third command, /mail:login. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013h8jopY81BGQ4Pn22NfZTu
ThreatCrush Security Scan10 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 4 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
ThreatCrush flagged rejectUnauthorized: false (CWE-295) in the IMAP and SMTP clients, there for Proton Mail Bridge's self-signed certificate on localhost. Verification now stays on everywhere: an account can name a PEM file to trust in place of the system roots (--tls-ca, MAIL_<NAME>_TLS_CA), and the Proton preset finds the copy Bridge keeps at its usual path on Linux, macOS and Windows by itself. A pinned path that cannot be read is an error at connect time, never a silent downgrade. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013h8jopY81BGQ4Pn22NfZTu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mail login <provider|address> [address] [--as NAME]— sign in to any mail provider that still takes a password over IMAP and SMTP. Follows #48, which shippedmailwith two providers.--no-verifyopts out.mail login you@yourdomain.comneeds no--provider. A failed lookup is simply "say which".mail providerslists the fifteen built in — Forward Email, Gmail / Workspace, Yahoo, AOL, iCloud, Fastmail, Zoho, Proton (through Proton Mail Bridge on localhost), GMX, Yandex, mail.com, Posteo, mailbox.org, Migadu, Purelymail — with hosts, ports and the password rule, then the hosts a password cannot reach: Outlook.com / Hotmail / Microsoft 365 (Microsoft removed basic auth; OAuth2 only, app passwords no longer count), Tuta and HEY (no IMAP or SMTP at all).mail login outlookexplains instead of failing a login.--tls-ca,MAIL_<NAME>_TLS_CA), and the Proton preset finds the copy Bridge keeps at its usual path on Linux, macOS and Windows by itself. A pinned path that cannot be read is an error at connect time, never a silent downgrade. (The first push usedrejectUnauthorized: false; ThreatCrush flagged it, rightly, and this replaces it.)imapSecure(IMAP STARTTLS on 1143, for the Bridge), readable from the vault as_IMAP_SECURE;--imap-starttlsforcustom./mail:login; plugin 0.2.0; README and plugin docs.Verified
test/mail.test.ts, 19 new: the table's self-consistency, domain and MX inference, the unreachable list,verifyAccountwith injected probes, certificate pinning, vault and file round-trips of the new fields); typecheck clean apart from the two pre-existingfree-nameserrors on master. (test/torrent.test.tstalks to a live tracker and timed out once on the dev box, unrelated.)mail login <business address> --as worktestwith no provider named read Forward Email off the MX records, verified both IMAP and SMTP, stored the account;mail ls -a worktestlisted the inbox;accounts rmremoved it.mail login outlook …, a Hotmail address, an unknown provider name, a bare address on an unknown domain, and a wrong Gmail password each produce the intended message and store nothing.127.0.0.1/localhostin its SAN for pinning to pass hostname verification; if a Bridge user reports a hostname mismatch, that is the place to look.🤖 Generated with Claude Code
https://claude.ai/code/session_013h8jopY81BGQ4Pn22NfZTu