From b43529a2e9ee093d1709af3d502256b08ea72d45 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Sun, 20 Aug 2023 18:26:20 +0200 Subject: [PATCH] sendmail: bugfix: set remote hostname to verify for tls connections due to logic bug we weren't setting it, and tls connections would fail with a warning that either the remote hostname must be set or insecurityskipverify must be set. --- sendmail.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sendmail.go b/sendmail.go index 297b3e9..f73fa64 100644 --- a/sendmail.go +++ b/sendmail.go @@ -274,7 +274,7 @@ binary should be setgid that group: xsavecheckf(err, "parsing our local hostname") var remoteHostname dns.Domain - if net.ParseIP(submitconf.Host) != nil { + if net.ParseIP(submitconf.Host) == nil { remoteHostname, err = dns.ParseDomain(submitconf.Host) xsavecheckf(err, "parsing remote hostname") }