Commit Graph
7 Commits
Author SHA1 Message Date
Matthew Meszaros 3532039037 feat: explain each refused mailbox connection in plain words with what to do (a host on a private network address, sign-in offered only unencrypted, no STARTTLS, no supported AUTH mechanism, an unverified or unpinned certificate, a send whose content could not be decrypted) in the connection test, stored mailbox errors and import causes, add an optional reason to API error responses with certificate_untrusted on mailbox_tls_failed for the dashboard's trust option, and treat tls_unverified and tls_pin as post-fixture fields in the Avro envelope test 2026-10-23 19:52:54 +02:00
Matthew Meszaros 03fd30f9bc feat: merge decoded-byte image validation with download-safe serving, own-domain form and domain redirects, TLS-only SMTP AUTH negotiation and pinned per-server certificate opt-outs, with MAIL_TLS_INSECURE honoured on self-hosted and development instances and resolved by the control plane for joining nodes 2026-10-23 16:20:30 +02:00
Matthew Meszaros 4624cc4a74 feat: negotiate mailbox SMTP AUTH by link (LOGIN then PLAIN only over TLS or loopback, CRAM-MD5 last, never a password mechanism in cleartext) for the send path, the connection test and the platform relay, honour MAIL_TLS_INSECURE only under APP_ENV=dev, and trust a mailbox server whose owner opted out of CA verification only on its pinned SPKI SHA-256 via VerifyConnection, reporting TLS_CERTIFICATE_CHANGED or TLS_CERTIFICATE_UNCONFIRMED as retryable connection errors 2026-10-23 16:15:55 +02:00
Matthew Meszaros d7bacf6112 feat: check every mailbox SMTP and IMAP dial against its resolved peer address in netbind, refusing loopback, private, link-local, CGNAT, multicast and metadata addresses on hosted production and wherever MAIL_ALLOW_PRIVATE_HOSTS=false, render that resolved policy into each joining node's env, and honour WARMBLY_ALLOW_UNSAFE_WEBHOOK_URLS only on self-hosted or development instances 2026-10-23 16:02:52 +02:00
Matthew Meszaros 766bd3ae6a feat: let a self-hosted instance connect a mail server on its own machine by adding a third mailbox security mode, "none", accepted only for a loopback literal and only where the worker shares a host with the relay, so Proton Bridge on 127.0.0.1:1143/1025 and a local Dovecot or Mailpit can be connected at all, with the rule enforced in onboarding and reauth validation, again by the worker against the peer it actually dialled rather than the name it was given, and hidden from the connect form on the hosted product where the worker is never the customer's machine 2026-09-07 08:07:40 -07:00
Matthew Meszaros 932b0bc856 feat: add the MAIL_TLS_INSECURE dev knob (netbind) so worker mail clients can skip TLS verification and, for SMTP, tolerate a server with no STARTTLS - local mailpit/dovecot only; production behavior is unchanged when the env var is unset 2026-07-11 17:30:20 +02:00
Matthew Meszaros b71deb37a6 infra(netbind): per-egress outbound source-IP helper
Tiny helper that builds a *net.Dialer (and tls.Dialer wrapper) with an
optional LocalAddr. Used by the SMTP and IMAP clients so a worker on a
multi-IP box can bind outbound TCP to a specific source IP.

Bind IP comes from an explicit *net.TCPAddr on the client, or falls back
to the WORKER_BIND_IP env var, or finally to the OS default route. The
env-var path is cached once via sync.Once.

4 tests cover explicit bind, nil-passthrough, tls.Dialer composition,
and timeout sanity.
2026-05-27 14:41:12 +00:00