Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed RHEL 5.4 in my system. I have installed and configured nagios in RHEL 5.4 and nagios is working fine. When i give email address of my gmail in contacts.cfg of nagios configuration file i am receving mails. But when i give my companys domain email addrress i am not receving the mails please help me any one to configure the following are the log messages when i am receving when sending the mail.

Gmail log message:

Jan 21 13:55:06 companyname sendmail[21701]: p0L8P6Dv021701: to=john@gmail.com, ctladdr=nagios (501/501), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30304, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p0L8P6o3021702 Message accepted for delivery) 
Jan 21 13:55:09 companyname sendmail[21704]: p0L8P6o3021702: to=<john@gmail.com>, ctladdr=<nagios@companyname.co.in> (501/501), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120595, relay=gmail-smtp-in.l.google.com. [74.125.155.27], dsn=2.0.0, stat=Sent (OK 1295598618 x16si20805320anx.100)

My own domain account:

Jan 21 15:21:47 companyname sendmail[24374]: p0L9plIu024374: from=<nagios@companyname.co.in>, size=317, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] 
Jan 21 15:22:17 companyname sendmail[24393]: p0L9qHYK024393: from=nagios, size=325, class=0, nrcpts=1, msgid=<201101210952.p0L9qHYK024393@curasoftware.co.in>, relay=nagios@localhost 
Jan 21 15:22:17 companyname sendmail[24394]: p0L9qHoW024394: <james@companyname.co.in>... User unknown 
Jan 21 15:22:17 companyname sendmail[24393]: p0L9qHYK024393: to=james@companyname.co.in, ctladdr=nagios (501/501), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30325, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown 

We have microsoft exchange server 2007 in which the james ID has been included.

Please help me any one how to configure

Thanks & Regards

share|improve this question

2 Answers 2

Check to make sure where companyname.co.in's MX resolves to on your Nagios server. I'd be willing to bet it is resolving to localhost or the local IP address so that Nagios/the local email server is attempting to deliver the mail locally instead of sending to the remote mail server.

There is a description on this question on how to disable local delivery of email for your domain on that system.

share|improve this answer

i had this problem, it wasn't sending to the local domain. the solution is to change the hosts file (i have it in /etc/hosts) to hostname.yourdomain.com and it will be able to send to outside users. as for the problem with the domain email, its a problem with dns try nslookup yourdomain locally and you will see there is no result. you have to go to the dns server and add an entry to your mail server in there in domain.com not in domain.local.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.