University Systems --> WAM --> Connecting to your WAM Account --> WAM E-Mail Information --> Mail in Unix -->

Mail in Unix


Configuration

Mail can be configured by placing commands in the .mailrc file. For a complete list of everything you can do and everything you can configure see the man pages for mail.

Useful .mailrc settings (these go in a file called ~/.mailrc):

set crt=24
This will cause the mail program to send the message to the PAGER program if the message is longer than 24 lines. The PAGER program will display the message a screenful at a time. The default pager is more.

 
set PAGER="more -s"
This will cause the more program to be used to display the message when it exceeds the number of lines set in crt above. This will allow you to do things like back up a screenful. See the man pages for more to find out all of its features.

 
set record=~/mbox
This will log all mail you send to a file. In this case, the mail would be logged to a file called mbox in your root directory.

Some Useful Commands

At the ampersand prompt:
?
Gives you a list of the commands available at the colon prompt.
Some useful tilde commands

(type them on a blank line in the message your sending):

~e
Invokes the editor defined by the EDITOR environment variable. You can set the EDITOR variable in .mailrc. You must use the full pathname, for example /usr/ucb/vi.

 
~h
Allows you to change the header information.

 
~r file
Reads file into the current message.

 
~v
Invokes the VISUAL editor on the mail message. You can set the value of VISUAL in .mailrc to be whatever editor you prefer (be sure to use the full pathname for the editor though).

 
~?
On-line help for the ~commands

To abort a mail message just do CTRL-C CTRL-C. Any text you have typed up to that point (and pressed return after) will be deposited in a file called ~/dead.letter.

To end the mail message, just press CTRL-D. This is the end of file character.
 

How do I:
How are we doing? Comments on this page?
Office of Information Technology
Office of Information Technology Help Desk Web Site University of Maryland Web Site Office of Information Technology Web Site