1

When setting up my raspberry pi to use local email (using exim4 as the default MTA on Raspbian/Debian), and while doing the debconf initial configuration, I was asked whether to forward root's email to my user account, and I did. In retrospect I wish I had also included root, as well as my user account (let's call it user1). In other words, any mail sent to root should in fact go to both root and user1.

Changing the alias in /etc/aliases to

root: user1, root

makes no difference. How do I now "CC" root's email to the root mail inbox, in addition to receiving it as user1, after the fact?

1
  • Root account poses "super powers". Reading/delivering emails "with root privileges" is a needles security risk. Do not deliver to root, send/store extra copies elsewhere.
    – AnFi
    Mar 10, 2019 at 9:06

2 Answers 2

1

It is not enough to edit /etc/aliases, you need to run:

sudo newaliases

and then

sudo service exim4 restart

From man newaliases

Newaliases rebuilds the random access data base for the mail aliases file /etc/aliases. It must be run each time this file is changed in order for the change to take effect.

1
  • Still does not work after these 2 commands. The Changed /etc/aliases seems to be read, but still only user1 gets the email (I tested with other users just to make sure the file is read). User1 still gets the email. Root gets nothing.
    – haziz
    Mar 10, 2019 at 7:31
0

Exim has a compile-time setting FIXED_NEVER_USERS which disallows delivering to root: https://github.com/Exim/exim/wiki/Q0039#question. There is no way around this without building your own debian package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .