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']
}
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:
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?