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.
This commit is contained in:
Mechiel Lukkien 2023-08-20 18:26:20 +02:00
parent 0b9475271c
commit b43529a2e9
No known key found for this signature in database

View file

@ -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")
}