Open jordansissel opened 9 years ago
According to the mail gem documentation to deliver messages to exit provide his very own delivery agent, this is what has been added in #30
mail.delivery_method :exim, :location => "/usr/bin/exim"
real life integration test to validate this works might be need.
(This issue was originally filed by @mpladna at https://github.com/elastic/logstash/issues/2831)
I've configured my email plugin like so:
...lots of config omitted if [log_level] == "ERROR" and [log_message] =~ "^\s*ALERT:" { email { via => "sendmail" to => "mpladna@lgscout.com" from => "no-reply@lgscout.com" replyto => "no-reply@lgscout.com" subject => "failure subject" htmlbody => "some html body" } }
On my mac this sends fine. However, on one of our dev unix systems, using exim4, it won't. When I look in the exim logs I see the email being bounced like so: 2015-03-16 15:37:27 1YXX55-0002BY-TY <= <> R=1YXX55-0002BV-S2 U=Debian-exim P=local S=7074 2015-03-16 15:37:27 1YXX55-0002BY-TY => no-reply@lgscout.com R=smarthost T=remote_smtp_smarthost H=XX.XX.XX.XX [XX.XX.XX.XX]
Logstash is running via a debian package we created as the logstash user. We've tried changing the 'via' option to exim, smtp, and sendmail. We've also toyed with the options hash to no avail. Exim4 is installed in the default location noted in the ruby Mail class.
We tested via our command line that we can send email from this box and we can do so as users, root, even sending the mail sudo -u logstash works. It just appears with logstash is sending via the email plugin it gets bounced.
Any help/ideas would be appreciated. Let me know if any other details are needed to help diagnose/fix.