I have email notifications for warning and critical situations and it works well.
I would like to customise these notifications where possible starting with the sender address.
Presently all emails received originate from: nagios@localhost.localdomain
I would like the emails to be sent from: myserver@mydomain.com
I thought the networking config was set correctly as per below however the hosts file still has the default settings.
[root@myserver ~]# hostname
myserver.mydomain.com
[root@myserver ~]#
[root@myserver ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
[root@myserver ~]#
Customise email notifications
Re: Customise email notifications
Can you share the command definition(s) you are currently using for your notification commands?
The answer to this depends on which mail client you're using as well as some things on the mail server side. Here's how to set the "sender" address if you're using mailx:
https://stackoverflow.com/questions/129 ... lx-command
The answer to this depends on which mail client you're using as well as some things on the mail server side. Here's how to set the "sender" address if you're using mailx:
https://stackoverflow.com/questions/129 ... lx-command
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/