User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

software:postfix:root_email [2019/06/06 16:49] (current)
Line 1: Line 1:
 +====== Handling System E-mail ======
 +Unix servers generate a lot of e-mail, with most of it being sent to the root user's mail account. When you have more than one or two servers, logging into each and checking mail (generally from the command line) is not effective. Instead, it is better to forward all system e-mail to a centralized account which can then be checked via normal procedures, for all servers set up this way.
 +The postfix smtp server uses the /​etc/​aliases file to override the "​normal"​ mail targets. Mail destinations are first read from the aliases file and, only if they can not be matched there, are then sent to individual users on the system.
 +To send all mail destined for the root user, you must first create an alias or an account on a centralized server, then perform the following to redirect mail to the root user to that account.
 +  - Edit /​etc/​aliases
 +  - Edit or create an entry for the root user. This is a colon separated line, with //root// on the left, and the actual target on the right.
 +  - Save the aliases file and exit to the command line
 +  - Execute the command //​newaliases//​ to convert the changes to aliases.db, which is the default hash file used by postfix.
 +<code bash aliases_addition>​
 +Note that this will forward to whatever server is set up as a relay server in /​etc/​postfix/​ To use [[software:​postfix:​authenticated_relay|Authenticated Relay]], read that article [[software:​postfix:​authenticated_relay|here]].
software/postfix/root_email.txt ยท Last modified: 2019/06/06 16:49 (external edit)