How can I deliver mail for the root user?

By default, the root user (System Administrator) is not mail enabled and that is good.

You should never enable mail reception for root directly.

This is best accomplished by adding an alias which will forward mail to another user.

To do so, edit

/etc/postfix/aliases

and change:

#root:          you

to

root: the_user_you_want_to_receive_mail_for_root

save and issue:

sudo newaliases

sudo postalias aliases

sudo postfix reload

If you look inside

/etc/postfix/aliases

, you will notice that all common system accounts (postmaster, hostmaster, etc) are aliased to root. So by making these changes you will receive mails for those users too. You can of course change the aliases in any way you like.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *