I recently changed the host name of our Nagios server however all email notifications still reflect the original hostname ([email protected]). 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?
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',mail.yourdomain.com’)dnl to both your sendmail.mc and your submit.mc (if you have one). Then rebuild the Sendmail config files and restart Sendmail. These files are probably in /etc/mail/.