Page 1 of 1

Email Send Mail From not same using notify-xx-by-mail

Posted: Wed Dec 12, 2018 7:28 am
by brucej543
Nagios XI new installation: I have set up additional contacts to send alerts notifications to users secondary email accounts (Mostly gmail.com) and its functioning as expected. The issue is that the "From" heading on the email is using the servers fully QDN ([email protected]) and not the Send Mail from settings ([email protected]) from Nagios XI. This is causing the emails to be treated as SPAM. The accounts are using the notiify-host-by-email and notify-service-by-email notification commands. How or where can i modifiy the settings to change the From to use the same from setting set Nagios XI.
Thanks

Forgot to include using SMTP as the Mail Method

Re: Email Send Mail From not same using notify-xx-by-mail

Posted: Wed Dec 12, 2018 10:27 am
by bolson
Hello Brucej543,

Please confirm for me that when you navigate to Admin >> Manage Email Settings, the Send Mail From field is set to [email protected]. Also, run the following command from a terminal session of your Nagios XI host and post the result:

Code: Select all

grep -r [email protected] /usr/local/

Re: Email Send Mail From not same using notify-xx-by-mail

Posted: Wed Dec 12, 2018 10:41 am
by brucej543
Brian, info requested in attachments

Re: Email Send Mail From not same using notify-xx-by-mail

Posted: Wed Dec 12, 2018 2:08 pm
by bolson
Hello Bruce,

The command "notify-host-by-email" simply calls the /bin/mail program to send notifications. In this implementation, the "Send From" argument is not passed to the /bin/mail program. The resolution for this is to use the xi_host_notification_handler and xi_service_notification_handler commands instead. Let me know if you have any additional questions of if this resolves your issue.

Thank you!

Re: Email Send Mail From not same using notify-xx-by-mail

Posted: Wed Dec 12, 2018 3:09 pm
by brucej543
Brian, It was my understanding in what i read, that if the Contact was not an defined NagiosXI user, you could not use the xi_xxx_notification_handler's and had to use the notify-xx-by-email. I tried using the xi handler and the eventman.log shows ERROR: could not find user_id for contact and no email was sent.
I am guessing the next thing would be to define them as valid XI user, which I really do not want to define a non-valid user as Auditors do not like that.

Re: Email Send Mail From not same using notify-xx-by-mail

Posted: Wed Dec 12, 2018 5:54 pm
by bolson
The other option would be to define a system "Send From" email address in your/etc/postfix/main.cf file. I'll look into how to do this and also see if there are other options.