From 8401ffff22140b3ad17f726b3e8943c1717abc07 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 20 Feb 2025 15:43:14 +1300 Subject: [PATCH] Fix: Display the correct STARTTLS or TLS runtime option on startup (#446) This is just a cosmetic fix as the functionality itself was working correctly, however the runtime log said "STARTTLS required" regardless which was set. --- internal/smtpd/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/smtpd/main.go b/internal/smtpd/main.go index e9309a1..2eb2ef6 100644 --- a/internal/smtpd/main.go +++ b/internal/smtpd/main.go @@ -282,10 +282,10 @@ func listenAndServe(addr string, handler MsgIDHandler, authHandler AuthHandler) smtpType := "no encryption" if config.SMTPTLSCert != "" { - if config.SMTPRequireSTARTTLS { - smtpType = "STARTTLS required" - } else if config.SMTPRequireTLS { + if config.SMTPRequireTLS { smtpType = "SSL/TLS required" + } else if config.SMTPRequireSTARTTLS { + smtpType = "STARTTLS required" } else { smtpType = "STARTTLS optional" if !config.SMTPAuthAllowInsecure && auth.SMTPCredentials != nil {