Exim: Email to root ignores /etc/aliases and /root/.forward - always used qualifies domain name
Your host doesn't sufficiently know that it is supposed to be qualified.example.com
. A local delivery to root
is rewritten as [email protected]
, which is (wrongly) considered to be elsewhere, so an off-host delivery is attempted.
You need to complete the process telling exim4
that your local host really is qualified.example.com
. Then, when it delivers to root
, rewritten as [email protected]
it will consider this as local delivery. It will then check the /etc/aliases
file and perform off-host delivery to [email protected]
per your instructions.
Let's assume your host's real DNS name is myhost.contoso.com
. Rerun dpkg-reconfigure exim4-config
and include these settings:
- System mail name:
myhost.contoso.com
- Other destinations for which [local] mail is accepted:
myhost : qualified.example.com
- Domains to relay mail for: {empty}
- Machines to relay mail for: {empty}
Then run update-exim4.conf
and invoke-rc.d exim4 restart