Nagios email stopped working after changing the relay mailserver

My colleague mentioned the other day that our Nagios monitoring was very quiet for the last couple of days. I checked the maillog on the Nagios server, to see that all the mails were in status ‘Sent’. A closer look at one of the records showed that Sendmail was still using the old MX record for the target domain. This record had been changed about a week ago and a
[root@Nagios ~]# dig MX
came up with the new SMTP server. I thought that a restart of Sendmail would fix the problem, but it did not. Bummer!! 🙁
The only way to force Sendmail to use the new MX server was to add the following line into the /etc/mail/mailertable: esmtp:[IP]
Where IP stands for the IP address of the mailserver in the MX record.

About Juergen Caris

I am 54yo, MSc(Dist) and BSc in Computer Science, German and working as a Senior Server Engineer for the NHS Lothian. I am responsible for the patient management system, called TrakCare. I am a UNIX/Linux guy, working in this sector for more than 20 years now. I am also interested in robotics, microprocessors, system monitoring, Home automation and programming.
This entry was posted in Linux, Nagios. Bookmark the permalink.

Leave a Reply

Your email address will not be published.