Document that SMTP supports port 465 only !5
merged
merged by cmc on 2026-10-24 03:32 UTC
· krz/domain-dig:smtp-465-only into main
3 files changed, +33 −0
Layout: unified · split
Docs/integrations.txt
added
+28
| @@ -0,0 +1,28 @@ |
| |
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 prefers implicit TLS over STARTTLS for mail submission. It also |
| |
27 | asks that both be offered during the transition, so supporting 465 alone is |
| |
28 | narrower than the RFC wants; the transport constraints above are the reason. |
DomainDig/IntegrationsView.swift
+4
| @@ -290,6 +290,10 @@ private struct IntegrationEditorView: View { |
| 290 | TextField("Port", text: $emailPort) |
290 | TextField("Port", text: $emailPort) |
| 291 | .keyboardType(.numberPad) |
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 | TextField("Username", text: $emailUsername) |
297 | TextField("Username", text: $emailUsername) |
| 294 | .textInputAutocapitalization(.never) |
298 | .textInputAutocapitalization(.never) |
| 295 | .autocorrectionDisabled() |
299 | .autocorrectionDisabled() |
README.org
+1
| @@ -68,6 +68,7 @@ git config core.hooksPath .githooks |
| 68 | #+begin_example |
68 | #+begin_example |
| 69 | local api: Docs/local-api.txt |
69 | local api: Docs/local-api.txt |
| 70 | data migration: Docs/data-migration.txt |
70 | data migration: Docs/data-migration.txt |
| |
71 | integrations: Docs/integrations.txt |
| 71 | accessibility: Docs/ACCESSIBILITY.txt |
72 | accessibility: Docs/ACCESSIBILITY.txt |
| 72 | security: SECURITY.txt |
73 | security: SECURITY.txt |
| 73 | #+end_example |
74 | #+end_example |