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?

  • 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 at 9:06
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.

  • 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 at 7:31

Your Answer

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

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