1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-13 20:04:49 +02:00

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.
This commit is contained in:
Ralph Slooten
2025-02-20 15:43:14 +13:00
parent a6d0db174b
commit 8401ffff22

View File

@@ -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 {