How to change Mail From email notifications


I recently changed the host name of our Nagios server however all email notifications still reflect the original hostname ( Is there somewhere within a Nagios configuration file that I can change the from email address for all email notifications? I’m using NullMailer as my SMTP relay agent and I’ve modified the adminaddr to reflect the from address that I’d like to use. Also, sometimes the alias part of the email address is root and other times it’s nagios. Why is it different sometimes?

Thanks in advance!


Hey there,

This doesn’t have anything to do with nagios, it’s to do with your mail client. Nagios is just piping info to sendmail (default) or whatever other mailer you may have set up.

did you update your /etc/hosts file?

If you’re using sendmail, tou can also try adding define(confDOMAIN_NAME',’)dnl to both your and your (if you have one). Then rebuild the Sendmail config files and restart Sendmail. These files are probably in /etc/mail/.

If you dont use your .mc files then you can add the following definition to your and