smtpclient: expose entire tls connectionstate, not just whether tls was enabled

for moxtools
This commit is contained in:
Mechiel Lukkien
2023-12-11 15:00:58 +01:00
parent f3a35a6766
commit 19d1a8059b
2 changed files with 10 additions and 6 deletions

View File

@ -596,7 +596,7 @@ func deliverHost(log mlog.Log, resolver dns.Resolver, dialer smtpclient.Dialer,
// be accurate for the whole domain, but we're only storing a hint.
rdt := store.RecipientDomainTLS{
Domain: m.RecipientDomain.Domain.Name(),
STARTTLS: sc.TLSEnabled(),
STARTTLS: sc.TLSConnectionState() != nil,
RequireTLS: sc.SupportsRequireTLS(),
}
if err = updateRecipientDomainTLS(ctx, log, m.SenderAccount, rdt); err != nil {