notification emails

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ssaammaa
Posts: 3
Joined: Wed May 14, 2014 8:07 pm

notification emails

Post by ssaammaa »

i worke with eyesofnetwork (centos 6.4) i want to configure postfix in order to receive mails in my adress gmail
how can i do it ?
and is there a method to configure notification through the graphic interface eonweb ?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: notification emails

Post by sreinhardt »

While nagios can use postfix as one of many different mailing options, it is outside of the scope of our forums to configure the actual server. However once you do, you should basically be able to set it as your local mta and nagios will use this by default. Are you having any particular issues with the configuration or simply looking for help getting started?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ssaammaa
Posts: 3
Joined: Wed May 14, 2014 8:07 pm

Re: notification emails

Post by ssaammaa »

i get started with the notification of main.cf of postfix. i added these lignes

Code: Select all

myhostname = localhost.localdomain
mydomain = localdomain  
myorigin = $myhostname 
default_transport = smtp 
relayhost = 74.125.232.149
after this configuration i restart the service postfix using the command

Code: Select all

/etc/init.d/postfix restart 
the adresse 74.125.232.149 is the adress of gmail.com (i am not sure if it is correct but i found that the value of relayhost should be the adresse of your mail )

in addition to that , i add my e-mail in the file contacts.cfg of nagios
i restart the nagios with the commande

Code: Select all

service nagios restart
when i test the command

Code: Select all

echo "test | mail -s "test postfix mail" [email protected]
i receive that i had a new message in the file /var/spool/mail/root
if i acceed to this file i receive undelivered message retur to the sender
what can i do to receive e-mails in my adress gmail ?
please help me :(
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: notification emails

Post by abrist »

Could you not send the mail directly with sendmail?
Have you tried asking for postfix help on their mailing list: http://postfix.1071664.n5.nabble.com/Po ... rs-f2.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ssaammaa
Posts: 3
Joined: Wed May 14, 2014 8:07 pm

Re: notification emails

Post by ssaammaa »

the command sendmail is not working
what can i do to receive e-mails :/
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: notification emails

Post by tmcdonald »

Like abrist said, you might have better luck on the postfix forums. We really don't do much with it aside from the automatic installation, so unless configs have been modified we tend not to get questions on it. I would suggest looking in your /var/log/maillog for any hints as to what might not be working.
Former Nagios employee
Locked