My two servers are nagios1.example.com and nagios2.example.com, They are both configured with local mail and smarthost.

On nagios1 in /etc/aliases

root: root@nagios2.example.com

On nagios2 in /etc/aliases

root: nagios

So I'd expect executing this command on nagios1 would send a mail to nagios on nagios2:

echo 'test mail' | mailx root@nagios2.example.com

Instead of this, exim call the remote smarthost router for delivery instead of doing the local delivery ( as nagios2.example.com is != nagios1.example.com maybe?).

I hope i've been clear enough. Tell me if any config file is needed.

edit: Adding nagios2.example.com to local_domains list could do the trick ? Looking for the right file to edit ..


Where the frack can I find local_domains settings all I found was

domainlist local_domains = MAIN_LOCAL_DOMAINS 

in /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs but ut appears to do nothing even with a restart of exim.


Found the right file : exim4.conf.template ( sigh.. ) , it's the file used when the config is not split in multiple files.

So I added nagios2.example.com to the local_domains list, result : nagios1 delivers the message to itself in /var/mail/mail ..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.