Книга: Fedora™ Unleashed, 2008 edition

Forwarding Email with Aliases

Forwarding Email with Aliases

Aliases enable you to have an infinite number of valid recipient addresses on your system, without having to worry about creating accounts or other support files for each address. For example, most systems have postmaster defined as a valid recipient, yet do not have an actual login account named postmaster. Aliases are configured in the file /etc/aliases. Here is an example of an alias entry:

postmaster: root

This entry forwards any mail received for postmaster to the root user. By default, almost all the aliases listed in the /etc/aliases file forward to root.

CAUTION

Reading email as root is a security hazard; a malicious email message can exploit an email client and cause it to execute arbitrary code as the user running the client. To avoid this danger, you can forward all of root's mail to another account and read it from there. You can choose one of two ways for doing this.

You can add an entry to the /etc/mail/aliases file that sends root's mail to a different account. For example, root: foobar would forward all mail intended for root to the account foobar.

The other way is to create a file named .forward in root's home directory that contains the address to which the mail should forward.

Any time you make a change to the /etc/mail/aliases file, you have to rebuild the aliases database before that change takes effect. This is done with the following:

# newaliases

Оглавление книги


Генерация: 1.347. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз