When you start mail, it looks for a file called /usr/lib/mail/mailrc. This optional file contains variables that customize mail for all users on the system.
After mail has executed the commands contained in /usr/lib/mail/mailrc, it then looks for a file your home directory called .mailrc. If it finds this file, it executes the commands contained in it. You can set up .mailrc to customize your own mail environment. The commands in this file override the commands in /usr/lib/mail/mailrc, but they only affect mail for you. A .mailrc might look like:
# set variables # do not ask for the carbon copy list set noaskcc # always ask for the subject of a message set asksubject # list most recently received message first set mchron # if you are a recipient, do not delete set metoo # use pg(C) for paging messages set crt=20 set PAGER=/usr/bin/pg # allow mail to print its starting message set noquiet # put messages that have been read in mbox set nohold
# personal aliases # using domain addressing alias andrea email@example.com # using UUCP addressing alias dilly babage.dreadco.com!dilly # using UUCP addressing via a path of several host machines alias schroder ldsc!dsc!uunet!tomata.cs.ucsc.edu!schroder # local aliases alias XTRproject perry susant peterp kevinc
While using mail, you can get a list of the
options currently set by typing set on its own.
You can also set or unset individual variables,
for example, to define make the screen scroll by 20 lines when
you read a message, enter:
For full details of all the environmental variables available for mail, see the mail(C) manual page.