info: postmaster

marketing: postmaster

sales: postmaster

support: postmaster

# trap decode to catch security attacks

decode: root

# Person who should get root's mail

#root: marc

You'll notice that all of the standard aliases are redirected to root but on most systems, no one checks the root mailbox, so you should start by defining who is to receive mail addressed to root . Uncomment the last line of this file and replace marc with a valid user ID:

root: chris  

Run the newaliases command after each edit to the /etc/aliases file to ensure that the changes are put into effect immediately:

# newaliases/etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total 

Next, change any aliases that you do not wish to redirect to root , sending the mail to the user of your choice:

info: sam

marketing: frida

sales: angela

support: henry  

Destination mailboxes do not have to be local:

abuse: [email protected]  

And it's possible to specify multiple destinations for an alias, separated by commas:

webmaster: frank, [email protected]  

This opens up the possibility of using aliases to create simple mailing lists. For example, all of your sales people could be reached through one address:

sales-team: angela, sue, mike, olgovie, george

sysadmins: [email protected],

[email protected], george  

Note that alias destinations can be on multiple lines.

You can create as many aliases as you want, whenever you want. Aliases are handy for creating disposable email addresses . I create batches of made-up addresses from time to time and use them when I register for a conference or web site, or when I enter a contest:

daa: chris

dab: chris

dac: chris

dad: chris

dae: chris

daf: chris

When I use one of these addresses, I record who I gave it to, and if I see spam arriving with that address, then I know who has been abusing my personal information. I can discontinue receiving mail at that address simply by removing the offending alias from the aliases file.

This strategy is also effective when publishing email addresses on a web site: simply change the address on the web site periodically, using a different disposable email address each time. If a spammer harvests your email address from the web page, it will be useful to them only for a short time.

7.6.1.5. Configuring virtual users

Aliases (and regular user accounts) have one critical limitation: they apply to all of the domains for which sendmail is accepting mail. If you have a server that is accepting mail for fedorabook.com as well as global.proximity.on.ca , and you define an alias or create a user account named chris , then mail to [email protected] and mail to [email protected] will end up in the same mailbox.

To overcome this limitation, use the /etc/mail/ virtusertable file to define where mail to each address should be sent. Each line in this file consists of an address, a space, and the destination. Here is an example:

[email protected] chris

[email protected] [email protected]  

Note that the syntax for /etc/mail/virtusertable differs from the syntax for /etc/aliases: there are no colons, and only one destination address may appear in each entry.

virtusertable also permits the redirection of entire domains, by leaving out the username portion of the email address:

[email protected] joseph

[email protected] [email protected]

@fedorabook.com chris

The last entry will redirect all mail to the fedorabook.com domain to the local user chris , except for mail addressed to [email protected] or [email protected] (because they are listed first, and the file is processed in the sequence given).

Like /etc/mail/sendmail.mc , the virtusertable file must be processed before it is used:

# cd /etc/mail

# make

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату