foxcpp / maddy

✉️ Composable all-in-one mail server.
https://maddy.email
GNU General Public License v3.0
5.14k stars 249 forks source link

Clone tlsCfg with ServerName because ServerName is needed by StartTLS #580

Closed litrop closed 1 year ago

litrop commented 1 year ago

When starttls is set to true, the following error happens.

auth.ldap: LDAP Result Code 200 "Network Error": TLS handshake failed (tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config)

And using hostname(Domain:Port) as ServerName still gets another error, and the Domain is only be needed.

auth.ldap: LDAP Result Code 200 "Network Error": TLS handshake failed (EOF)