I am trying to forward system email (from apt, cron, etc.) addressed to "root" to my personal email address using a smarthost. I am using Debian 9. First, I ran sudo dpkg-reconfigure exim4-config. This is the contents of /etc/exim4/update-exim4.conf.conf (I replaced all occurrences of my domain name with "example.com"):

dc_local_interfaces=' ; ::1'

I also set the correct password in /etc/exim4/passwd.client I can now successfully send mail to any email address with sendmail, mailx, etc.

Second, I edited /etc/aliases to contain the following:

mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: my-email-address@example.com

But, when I try to send an email to "root" with echo Hi | mailx root I see the following error in /etc/exim4/mainlog:

SMTP error from remote mail server after RCPT TO:<root@example.com>: 550 5.1.1 <root@example.com>: Recipient address rejected: User unknown in local recipient table

I thought I told Exim4 to redirect email for root to "my-email-address@example.com". But instead it is redirecting it to "root@example.com". Why is Exim4 not honouring my /etc/aliases? How should I setup Exim4 to redirect email for root to my personal email address?


The satellite configuration sends ALL email to the specified smarthost. No local delivery is considered, so the /etc/aliases file is not consulted.

If you want to have local delivery considered you should change the configuration type from satellite to smarthost.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.