Commit 24736d6462
24736d6462fc6ecb4d26a87d294b0a8201c037d6
parent: 9cfb50f90b
Verified · cmc
cmc <hello@cleberg.net> · 2026-10-24 03:24 UTC
Document that SMTP supports port 465 only
Add a caption under the SMTP port field stating that port 465 with Direct
TLS is supported and port 587 (STARTTLS) is not. Add Docs/integrations.txt
recording why STARTTLS is not implemented and link it from README.org.
Layout: unified · split
Docs/integrations.txt
added
+27
| @@ -0,0 +1,27 @@ |
| 1 | # DomainDig Integrations |
| 2 | |
| 3 | ## SMTP submission |
| 4 | |
| 5 | Email integrations support implicit TLS ("Direct TLS") on port 465. STARTTLS |
| 6 | on port 587 is not supported. |
| 7 | |
| 8 | `SMTPSecurityMode` has two cases: `.plain` and `.directTLS`. Sending with a |
| 9 | username configured and `.plain` selected throws |
| 10 | `IntegrationError.insecureCredentials`, and the integration editor refuses to |
| 11 | save that combination. |
| 12 | |
| 13 | Why STARTTLS is not implemented: |
| 14 | |
| 15 | - `NWConnection` cannot add TLS to an established connection. The protocol |
| 16 | stack is fixed when `NWParameters` is constructed, so the plaintext SMTP |
| 17 | greeting and the `STARTTLS` exchange cannot be followed by a TLS handshake |
| 18 | on the same connection. |
| 19 | - The alternative is CFStream, which can negotiate TLS in place through |
| 20 | `kCFStreamPropertySSLSettings`. `CFStreamCreatePairWithSocketToHost` is |
| 21 | deprecated in favour of Network.framework, which is the API that cannot do |
| 22 | this. CFStream also has no handshake-completion callback and needs its own |
| 23 | run-loop thread. A correct implementation must discard any bytes buffered |
| 24 | before the upgrade; otherwise it is open to the STARTTLS plaintext-injection |
| 25 | attack (CVE-2011-0411). |
| 26 | - RFC 8314 section 3.3 recommends implicit TLS on port 465 over STARTTLS on |
| 27 | port 587 for mail submission. |
DomainDig/IntegrationsView.swift
+4
| @@ -290,6 +290,10 @@ private struct IntegrationEditorView: View { |
| 290 | 290 | TextField("Port", text: $emailPort) |
| 291 | 291 | .keyboardType(.numberPad) |
| 292 | 292 | |
| 293 | Text("Port 465 with Direct TLS is supported. Port 587 (STARTTLS) is not.") |
| 294 | .font(.caption) |
| 295 | .foregroundStyle(Color(.appTextSecondary)) |
| 296 | |
| 293 | 297 | TextField("Username", text: $emailUsername) |
| 294 | 298 | .textInputAutocapitalization(.never) |
| 295 | 299 | .autocorrectionDisabled() |
README.org
+1
| @@ -68,6 +68,7 @@ git config core.hooksPath .githooks |
| 68 | 68 | #+begin_example |
| 69 | 69 | local api: Docs/local-api.txt |
| 70 | 70 | data migration: Docs/data-migration.txt |
| 71 | integrations: Docs/integrations.txt |
| 71 | 72 | accessibility: Docs/ACCESSIBILITY.txt |
| 72 | 73 | security: SECURITY.txt |
| 73 | 74 | #+end_example |