Page 2 of 2

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Wed Nov 08, 2017 11:36 am
by michaelpn
Hi Kyang,

output: /usr/bin/mail
Should I still install mailx ?

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Wed Nov 08, 2017 11:40 am
by michaelpn
[quote="michaelpn"]Hi Kyang,

output: /usr/bin/mail - please see my attachment. My "notify-host-by-email' command definition" is set to => usr/bin/mail in the definition :)





Should I still install mailx ?

Yes I still recieve SMS notification :)

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Wed Nov 08, 2017 3:15 pm
by kyang
output: /usr/bin/mail - please see my attachment. My "notify-host-by-email' command definition" is set to => usr/bin/mail in the definition
It seems like you are missing a /? Instead of usr/bin/mail it should be /usr/bin/mail

Could you post your commands.cfg again, just to double check?

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Thu Nov 09, 2017 12:14 pm
by michaelpn
Hi kyang,

now it works :) :) you were right :) it was "/" missing.

Now it is working for my my mail accout. Do I then have to setup my colleges mail accounts the same way I did with my using this?


Configure Postfix For Relaying

To configure our Postfix server for relaying emails through smtp.example.com, we run

postconf -e 'relayhost = smtp.example.com'
postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='

Our username (someuser) and password (howtoforge) for smtp.example.com must be stored in /etc/postfix/sasl_passwd, therefore we do this:

echo "smtp.example.com someuser:howtoforge" > /etc/postfix/sasl_passwd

/etc/postfix/sasl_passwd must be owned by root, and noone else should have read access to that file, so we do this:

chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd

Now we must convert /etc/postfix/sasl_passwd into a format that Postfix can read:

postmap /etc/postfix/sasl_passwd

This will create the file /etc/postfix/sasl_passwd.db.

All that is left to do is restart Postfix:

/etc/init.d/postfix restart

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Thu Nov 09, 2017 3:36 pm
by kyang
Glad to hear it's working!
Now it is working for my my mail accout. Do I then have to setup my colleges mail accounts the same way I did with my using this?
By this, do you mean you will be setting up other mail accounts for another Core or the same Core server?
by dwhitfield
You're probably just going to be sending email as one user, correct? That would be the only user that needs to auth.
What @dwhitfield said is probably still the case, but try it out and see what happens.

Did you have any more questions or are we okay to close this thread?

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Thu Nov 09, 2017 3:56 pm
by michaelpn
Hi kyang,

What I’m meaning is I still have 5 other users who should be notisfied like me by mail. So my question is how should I do that ? Do I use the same command like I did for me meaning using the relay configuring ? You see in my contact.cfg file all get a SMS notification the should also be notified by mail. Do you now understand :) I will try to enable them again in my contact.cfg file and look how it goes :)

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Fri Nov 10, 2017 9:49 am
by michaelpn
Hi
you can close this thread now.

Re: Configuring e-Mail Notifications in Nagios Core

Posted: Fri Nov 10, 2017 11:51 am
by kyang
Sounds great, hope you got it working! I'll be closing this topic.

If you have any more questions, feel free to create another thread!

Thank you for using the Nagios Support Forum!