Skip to content

openssl_verify_mode does not work in mail output with STARTTLS protocol #2879

@IldarMinaev

Description

@IldarMinaev

There is an issue in mail-2.5.3 lib (logstash used it), that cause error in mail delivery via STARTTLS protocol with disabled hostname verification.
This issue currently resolved in new version (2.6.3: https://rubygems.org/gems/mail/versions/2.6.3), see the code: https://github.com/mikel/mail/blob/master/lib/mail/network/delivery_methods/smtp.rb).
To add openssl_verify_mode to logstash see my updates in the file https://github.com/IldarMinaev/files/blob/master/logstash/lib/logstash/outputs/email.rb
So, config can be following:

email {
             from => "logstash@domain.com"
             to => "recepient@domain.com;"
             subject => "tmp"
             body => [ "tmp" ]
             via => "smtp"
             options => [ "smtpIporHost", "mailhost.domain.com",
                                  "port", "25",
                                  "domain", "domain.com",
                                  "starttls", "true",
                                  "debug", "true",
                                  "openssl_verify_mode", 'none']
}

I have mannually fixed this issue in mail-2.5.3 lib (see: https://github.com/IldarMinaev/files/blob/master/logstash/vendor/bundle/jruby/1.9/gems/mail-2.5.3/lib/mail/network/delivery_methods/smtp.rb)

My question:
If you planned to update gems libs in Logstash?
Could you add openssl_verify_mode propertie to 'mail' output Logstash plugin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions