Configuring email thru a relay on Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tbyrne
Posts: 39
Joined: Tue Oct 21, 2014 2:02 pm
Location: Bohemia NY

Configuring email thru a relay on Nagios XI

Post by tbyrne »

Hello,

I have a Nagios XI server setup on a secure network with no Internet connection. To send emails out I have to send then thru an email relay which then sends then to an email server connected to the internet.

I tried both sendmail and smtp. SMTP fails with an error message that an error occurred. sendmail completes with no errors but when I tailed out the maillog file I found that sendmail was trying to perform a DNS lookup for the mx record for the email recipient and of course failed.

I have put in the host address ( both ip and fqdn ) in the smtp host settings. I am able to test this with a vbscript I wrote for my windows box so I know it works.
The relay server does not require any username or password, and uses the standard port 25. Security is set to none.

Is there a way to configure postfix or phpmailer to work with the relay server?

Thanks,
tbyrne
Posts: 39
Joined: Tue Oct 21, 2014 2:02 pm
Location: Bohemia NY

Re: Configuring email thru a relay on Nagios XI

Post by tbyrne »

OK,

I figured this one out. I modified the /etc/postfix/main.cf file and added the relay host into the config

relayhost = [mail.at-our-domain.com]

restarted postfix.

We setup the nagios to use sendmail


and mail works.

Issue resolved
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Configuring email thru a relay on Nagios XI

Post by jolson »

Closing this post out. If you have any further issues, feel free to open another. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked