Quite
often you will want to send mail to several users at the same time
(the entire accounting department perhaps). To do that you could
enter all of their addresses on the to: line or you could create
a mail alias.
A mail alias
is a group of user names that are stored in a file together. When
you want to send mail to the members of the group you just address
the alias instead of the individual users.
Command
Format
mail aliasname
To create
an alias you must edit the .mailrc file (located in your home
directory). You can use any editor to create or add mail aliases
to the .mailrc file. Create one mail alias per line
with the format: alias name userlist. Once finished save
the changes. For example:
$ cd
$ vi .mailrc
~
~
~
~
".mailrc" [newfile]
alias test BobJ@srv1 JoeS@srv2 TomR@srv3
Escape
:wq
Now you can
view the alias with the a command in mail:
$ mail
& a
test BobJ@srv1
JoeS@srv2 TomR@srv3
&
Now just address
an e-mail to the alias instead of the individual users:
$ mail test
Subject: test
This is a test of my newly created alias
user2
.