Change the default email domain for SendMail / Ctrladdr / Nagios From Email


I was searching to send Nagios alert email from a CentOS box. Normally when you setup your sendmail using a smart relay. The default email it’s always :
username@linux_hostname_fqdn. or nagios@nagiossrv.domain.local

to replace the @nagiossrv.domain.local. The only way I figure it out.

I modified the *** modify the hostname to have your domain name

change the for your domain name.

Now I modified the Host File.
/etc/hosts localhost …..
::1 localhost …..

I added my domain first, after my server name.

Restart the server

Test your Nagios notification, this should be now from : (or in your case

This should work.

Leave a Reply