ImapConnectInput.secure is a single boolean applied to two independent connections. It is stored as one column (imap_mailbox_config.secure), sent as one field, and rendered as one "Use TLS" toggle in the connect form.
The two legs routinely differ. Every provider preset in the connect UI pairs IMAP on 993 (implicit TLS) with SMTP on either 465 (implicit) or 587 (STARTTLS).
What was already fixed, and what wasn't
PR #165 fixed the immediate defect: the IMAP leg now derives its TLS mode from imapPort (imapImplicitTlsForPort, RFC 8314 §3.3) instead of taking the shared flag. Before that, an Outlook or iCloud preset (imapPort: 993, smtpPort: 587, secure: false) attempted STARTTLS against an implicit-TLS IMAP port — those presets could never have connected.
That is a targeted fix, not the right end state. It leaves:
- A field whose name lies about its scope.
secure now governs only SMTP, but nothing in its name, its column, or its UI label says so.
- TLS inferred rather than stated for IMAP. Port-derived is correct for every port in the presets, and standard, but it is still inference. An operator running IMAP on a non-standard port with implicit TLS has no way to say so.
- One toggle in the UI for two independent settings.
Acceptance
ImapConnectInput carries per-leg TLS (e.g. imapSecure / smtpSecure), and imap_mailbox_config stores both. Migration 027 has not shipped, so it can be amended in place rather than stacked.
- The connect form presents TLS per leg, or presents a defensible derived default with an advanced override. This is the part that needs a product decision, not just an implementation.
- Presets are updated to state both values explicitly.
imapImplicitTlsForPort either becomes the default-derivation helper behind the new field, or is removed — it should not survive as a second, competing source of truth.
Also needs a maintainer decision
The preset table's secure values and hostnames were corrected against nodemailer's documented behaviour by whoever wrote them, and the code comment flags that correction for review. Someone should confirm the preset values against each provider's current published settings before this ships to external operators — a wrong preset is a support ticket for every operator who picks it.
Found by CodeRabbit on PR #165 (2026-07-31); partial fix landed there.
ImapConnectInput.secureis a single boolean applied to two independent connections. It is stored as one column (imap_mailbox_config.secure), sent as one field, and rendered as one "Use TLS" toggle in the connect form.The two legs routinely differ. Every provider preset in the connect UI pairs IMAP on 993 (implicit TLS) with SMTP on either 465 (implicit) or 587 (STARTTLS).
What was already fixed, and what wasn't
PR #165 fixed the immediate defect: the IMAP leg now derives its TLS mode from
imapPort(imapImplicitTlsForPort, RFC 8314 §3.3) instead of taking the shared flag. Before that, an Outlook or iCloud preset (imapPort: 993, smtpPort: 587, secure: false) attempted STARTTLS against an implicit-TLS IMAP port — those presets could never have connected.That is a targeted fix, not the right end state. It leaves:
securenow governs only SMTP, but nothing in its name, its column, or its UI label says so.Acceptance
ImapConnectInputcarries per-leg TLS (e.g.imapSecure/smtpSecure), andimap_mailbox_configstores both. Migration 027 has not shipped, so it can be amended in place rather than stacked.imapImplicitTlsForPorteither becomes the default-derivation helper behind the new field, or is removed — it should not survive as a second, competing source of truth.Also needs a maintainer decision
The preset table's
securevalues and hostnames were corrected against nodemailer's documented behaviour by whoever wrote them, and the code comment flags that correction for review. Someone should confirm the preset values against each provider's current published settings before this ships to external operators — a wrong preset is a support ticket for every operator who picks it.Found by CodeRabbit on PR #165 (2026-07-31); partial fix landed there.