I'm working with a CentOS server that has Nagios running and sending notification emails. The emails are still going to the old email system which was kept up to ensure all emails were being routed to the correct location. I didn't set the system up, but it appears that this machine was able to relay to the smtp server to send mail? It still sends it through to the old system. I have the hostname for the new SMTP server but I'm not sure where I need to input this data.
Nagios actually uses external commands to send email—it doesn't send them directly. For example, in our config here,
if you scroll to the right, you'll see that it's sending via
If yours is also going through the system MTA, you'll probably find the Email chapter of the Deployment Guide useful, in particular its two MTA sections.