Skip to content

x509_cert: add support for SMTP certificates over STARTTLS #7679

@tryfail

Description

@tryfail

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions