Client certificate authentication (Office 365 connector)
Could client certificate authentication be used for the remote smtp server ?
The use case is for Office 365 with the connector enabled for subject name in the certificate.
local_cert and local_key are used only for the local part not with the upstream connection to the smtp server.
It's definitely not possible at the moment but I can check if our SMTP client code can support it in the future.
This feature would be useful to me too!
I looked into the code and it looks like the tls.Config struct could be configured with "Certificates" (https://pkg.go.dev/crypto/tls#Config). If my deduction is correct, then this feature (luckily) requires some plumbing to complete. I'll make an attempt, but don't hold your breath because my Go is bad.
https://github.com/decke/smtprelay/blob/780ac71f7420d19b7d6c0a37e6f62f9a85116577/smtp.go#L338-L343 https://github.com/decke/smtprelay/blob/780ac71f7420d19b7d6c0a37e6f62f9a85116577/smtp.go#L364-L372