Commit Graph
2 Commits
Author SHA1 Message Date
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