Page 1 of 1

Configuring email thru a relay on Nagios XI

Posted: Mon Feb 23, 2015 7:08 am
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,

Re: Configuring email thru a relay on Nagios XI

Posted: Mon Feb 23, 2015 9:22 am
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

Re: Configuring email thru a relay on Nagios XI

Posted: Mon Feb 23, 2015 10:53 am
by jolson
Closing this post out. If you have any further issues, feel free to open another. Thanks!