Page 1 of 1

Nagios Alerts through Exchange server.

Posted: Sat Apr 07, 2012 11:54 pm
by android
Hi,
I am trying to configure my nagios ( which works fine ) to send alerts using our companies exchange server . well, i know there are hundreds of discussions in forums on the same topic , but i couldnt find anything to help me yet , mainly because most of them refers to either having a mailserver installed in localhost, with mx records and domain and everything ( which i dont want ) or else installing an MTA and relaying it through exchange server ( which i cant , because IT policy of my company doesnt permit to relay anything thru exchange server ) , so all i have is a username and password registered with exchange server and the IP/Domain name of the exchange server ( i guess we can get it done by just that , right ??? )....
i have been trying with both sendmail and postfix (one at a time) for more than a week , but something just doesnt seem to get right.....there was all sorts of errors , then authentication failures , and finally i even got the log to say 'send for delivery' but nothing came thru.....
Right now , i dont have any perticular configuration file details or error messages to share , i kinda got impatient and deleted both postfix and sendmail , and wanted to start afresh .. i would appreciate if anyone here can give me a clear idea as to what needs to be done . also i did find couple of perl scripts in nagios exchange to work as email alerts, i did not try it out yet, would like to know if this has any advantage / disadvantage over using the typical mail server method .

btw i am using nagios 3.3 installed on fedora 15 core, and corporate mail server : MS exchange 2007

Thanks ....

Re: Nagios Alerts through Exchange server.

Posted: Tue Apr 10, 2012 6:41 pm
by jsmurphy
You shouldn't really need to touch sendmail beyond installing it, just worry about Postfix.

So what you should have installed is:
Mail or Mailx
Sendmail
Postfix

Now for me, getting postfix working was as easy as setting the following two lines:
relayhost = <Address of SMTP relay>
myhostname = <Hostname of this server>

If this doesn't work and you get "message bounced" errors you will need to speak to your exchange admin and ask how he has configured the SMTP relay and if there are any restrictions on what it will accept. If you see errors for your local configuration post them up and we will see if we can work out what's going on.

Re: Nagios Alerts through Exchange server.

Posted: Thu Apr 12, 2012 3:20 am
by android
Thanks jsmurphy for the reply. but that was the whole trouble, all i had to do was enter my exchange server as the relay server and get IT dept to add my nagios server as trusted in the relay server's list in exchange server . which IT couldnt do as it is against their policy ....
However i did get it to work this time , didnt do anything special, i just used sendmail by the way . added my exchange server as the remote smtp host , added authentication using my credentials and this time it worked :? ...i think it was just waiting for the right time :)

Re: Nagios Alerts through Exchange server.

Posted: Thu Apr 12, 2012 5:37 pm
by jsmurphy
Oh yes of course, I'm not sure how I missed that! Glad you got it working :)