From the course: Linux System Engineer: Mail Systems Using Postfix

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

The aliases file

The aliases file

From the course: Linux System Engineer: Mail Systems Using Postfix

Start my 1-month free trial

The aliases file

- [Instructor] The aliases file is a file that forwards email from one recipient to another local recipient. Unlike the other files we've looked at, this file has non-commented working lines. So let's take a look at it. On your rhhost1 VM in a terminal, type in less stash e t c slash aliases and hit enter. Notice the path to this file is different than the others as it's an etc and not an etc postfix. The format is pretty simple: any mail sent to the recipient on the left gets forwarded to the recipient on the right. Notice that there are a lot of service names. Any mail sent to the names of these services will get forwarded to the root account, so the root user will see them. Notice at the very bottom of the file, we can also decide who gets the emails to root. Since it's not a good idea for someone to be logged in as root, we can have all emails to root be forwarded to a user account. In our case, maybe we'd want them sent to the user named user 1. Another interesting use is that we…

Contents