Create e-mail alias for Root user to recieve system mails and notifications

Occasionally, FBX may send email notifications to the root user to i.e. notify of security status, incorrect password attempts, cronjobs and the like.

As a regular user does not receive these email notifications, it’s possible to create an alias for the root user to point to another e-mail user on the server.

One way to achieve this is to have postfix mapping as below:

  1. Open the aliases file
sudo nano /etc/aliases
  1. Find or add the following line, changing yourusername as appropriate
root: yourusername
  1. Rebuild the postfix aliases with
sudo newaliases

With the above, I have been successfully receiving system email notifications in my inbox.

Have fun.

3 Likes

Very relevant. But i can’t use real mail. If it makes sense, could this be set up to send mail locally using Exim that can then be read remotely by terminal using Mutt?

Or perhaps this is simpler: by also storing these systematic and readable reports locally, so that they are quickly accessible via terminal.

im not sure i understand. the above is just to forward mails sent to the root user. what does ‘real mail’ mean?

with fbx, if you wish, you can install the postfix/dovecot mail suite, but then exim would become obsolete.

mutt is just a client so if you have the server side setup, i guess you can use it.

Sorry for my english. I meant that I can’t set up an email because I use a free DDNS service. If this circumstance is not relevant, great.

now i see… im sorry, as far as i know, to use the fbx mail suite, you need a static ip and preferrably ptr.
i dont know where ddns would sit in all this…

Thanks a lot @Ged ! I did try it on my remote FreedomBox used for backups (postfix and mailutils installed) and wrote my e-mail address to root root: my_e-mail_address and receive mails from there. Cool feature :slight_smile:

1 Like