-
Notifications
You must be signed in to change notification settings - Fork 5.8k
x509_cert: add support for SMTP certificates over STARTTLS #7679
Description
Feature Request
Some mail servers I support, cannot be monitored through telegraf's x509_cert input plugin. This happens, because these services only expose certificates after receiving a STARTTLS SMTP message.
I believe, this will also make the plugin more complete as per its current description.
Proposal:
Add support for SMTP+STARTTLS through telegraf's x509_cert input plugin.
Current behavior:
Using a source like tcp://smtp.example.com:587, will produce the following error:
[inputs.x509_cert] Error in plugin: cannot get SSL cert 'tcp://smtp.example.com:587': tls: first record does not look like a TLS handshake
Desired behavior:
Using something like smtp+starttls://smtp.example.com:587 will produce the certificates as usual for HTTPS connections and other TLS-wrapped protocols.
Use case:
The use case is to support certificate monitoring for SMTP servers that do not have a TLS-wrapped endpoint and will only support TLS with STARTTLS in the long term.