Skip to content

Commit e5e7256

Browse files
committed
smtpsrv: Disable TLS session tickets to work around Microsoft problems
Microsoft SMTP servers have a bug that prevents them from successfully establishing a TLS connection against modern Go TLS servers, and some OpenSSL versions. It also doesn't fall back to plain-text, so this has been causing deliverablity issues. The problem started by the end of 2024 and it's still not fixed. Unfortunately, because they're quite a big provider and are not fixing their problem, it is worth to do a server-side workaround. This patch implements that workaround: it disables TLS session tickets. There is no security impact for doing so, and there is a small performance penalty which is likely to be insignificant for chasquid's main use cases. This workaround should be removed once Microsoft fixes their problem. We are going to make a 1.15.1 release for this, which this patch also documents. Thanks to Michael (l6d-dev@github) for reporting this issue and suggesting this workaround! See #64 and golang/go#70232 for more details.
1 parent 14892f4 commit e5e7256

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

docs/relnotes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ noting backward-incompatible changes or known security issues.
1111
- Log how many things were loaded for each domain.
1212
- Add fail2ban filter configuration example.
1313

14+
### 1.15.1 (2025-03-30)
15+
16+
Implement a workaround for a Microsoft bug in TLS session ticket handling,
17+
that is causing deliverability issues, and they are being too slow at fixing.
18+
19+
See this [chasquid issue](https://github.com/albertito/chasquid/issues/64),
20+
this [Go issue](https://github.com/golang/go/issues/70232) and this
21+
[Postfix thread](https://www.mail-archive.com/[email protected]/msg104308.html)
22+
for more details.
23+
1424

1525
## 1.14.0 (2024-04-21)
1626

internal/smtpsrv/server.go

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,28 @@ func NewServer() *Server {
9494
authr := auth.NewAuthenticator()
9595
aliasesR := aliases.NewResolver(authr.Exists)
9696
return &Server{
97-
addrs: map[SocketMode][]string{},
98-
listeners: map[SocketMode][]net.Listener{},
99-
tlsConfig: &tls.Config{},
97+
addrs: map[SocketMode][]string{},
98+
listeners: map[SocketMode][]net.Listener{},
99+
100+
// Disable session tickets for now, to workaround a Microsoft bug
101+
// causing deliverability issues.
102+
//
103+
// See https://github.com/golang/go/issues/70232 for more details.
104+
//
105+
// This doesn't impact security, it just makes the re-establishment of
106+
// TLS sessions a bit slower, but for a server like chasquid it's not
107+
// going to be significant.
108+
//
109+
// Note this is not a Go-specific problem, and affects other servers
110+
// too (like Postfix/OpenSSL). This is a Microsoft problem that they
111+
// need to fix. Unfortunately, because they're quite a big provider
112+
// and are not very responsive in fixing their problems, we have to do
113+
// a workaround here.
114+
// TODO: Remove this once Microsoft fixes their servers.
115+
tlsConfig: &tls.Config{
116+
SessionTicketsDisabled: true,
117+
},
118+
100119
connTimeout: 20 * time.Minute,
101120
commandTimeout: 1 * time.Minute,
102121
localDomains: &set.String{},

0 commit comments

Comments
 (0)