OpenWindows Advanced User's Guide

7.8.1 Setting Up Mail Aliases in .mailrc

Note the following about setting up mail aliases in .mailrc:

.mailrc is located in your home directory. This file contains a number of settings that control the behavior of mailx and Mail Tool.

To add a mail alias to .mailrc, type:

$ vi ~/.mailrc    


Note -

You can use any text editor to edit the .mailrc file. The example above shows the method for using the vi editor to edit the file. If you are not already familiar with vi, refer to Chapter 6, Using the vi Editorfor instructions.


Each mail alias is contained on one line of the file; that is, it can visually "wrap around" to another line, but it cannot contain carriage returns. Each mail alias should contain the following, separated by spaces:

The example below shows two mail aliases. The first (amigos) contains three people. The second (softball) contains eight. Notice in softball how the names are visually wrapped around on the screen. This is fine, as long as no carriage returns are used.

alias amigos hank@fretful george@lonesome sally@dakota
alias softball earl@woofer tex@twister elmer@farmhouse
jane@freeway hank@fretful jj@walker sally@dakota steve@hardway

To send mail to people on a .mailrc alias, just address it to the mail alias name. Do not include your machine name. For example, if you sent the following:

$ mail amigos
Subject: Let's eat

Hey Compadres. How about
getting together for lunch on Friday?
Anyone interested?

the recipients would see the following (note the expanded To: line):

To: hank@fretful george@lonesome sally@dakota
Subject: Let's eat

Hey Compadres. How about getting together for lunch on Friday?
Anyone interested?