When trying to send a mail with golang to my local postfix server I get the error
x509: certificate signed by unknown authority
Consider the following code:
config := &tls.Config{ServerName: "example.com"}
_, err := tls.Dial("tcp", "example.com:443", config)
//err == nil
c,_ := smtp.Dial("example.com:25")
err = c.StartTLS(config)
//err == x509: certificate signed by unknown authority
Apache and postfix both use the same cert signed by StartSSL.
How comes it is accepted in one instance and rejected in the other?
As a sidenote: is it possible to get more information on the certificate in the smtp case?