DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using e-mail

Reading mail

To read a message, type its number and press <Enter>. The message is then displayed. You see the message header (including ``To'', ``From'', and ``Subject'' lines) along with the message itself:

   & 1
   Message  1:
   From: susant Fri Mar 05 09:30:12 1993
   From: susant@bps.com (Susan Tzarcha)
   To: perry
   Subject: Lunch?
   Date: Fri, 05 Mar 1993 09:29:21 (EST)
   Message-ID:  <9303120929.aa0915@machina.bps.com>
   Status: RO
   

Hi, what are you doing for lunch today? Alison and Greg have suggested we try the new restaurant in the Plaza.

&

Once you have read a message, it is automatically saved to your mbox file (by default).

Depending on how mail is set up, long messages may scroll off the screen. If this happens, press <Ctrl>S to temporarily stop the scrolling, and <Ctrl>Q to start it again. A more practical solution is to set the number of lines the screen scrolls by when you read a message. To do this, type set crt=20 at the mail prompt. The screen will then pause every 20 lines. To make this setting permanent, add the line set crt=20 to the .mailrc file in your home directory.

For details on setting variables in the .mailrc file, see ``Setting environment variables''.

You can select the program that mail uses to view long messages by setting the PAGER variable to the pathname of a suitable command (such as /usr/bin/pg). You must also have set crt to a suitable value for this to work. (A paging program allows you to quit reading a message at any stage. Depending on your choice of program, it may also allow you to search for text strings and change your position in the message.)

Viewing the header list

You can redisplay the message headers using the command h (short for header). If you want to stop reading a long message to return to the headers, press <Del> then enter h to redisplay the headers. If you have more than one screen of headers, type h+ to move forward to the next screen, and h- to go back to the previous one. You can also specify the number of screens to move after both + and -.

Selecting particular messages

To display the headers of messages on a particular subject, type h/subject at the mail prompt, where subject is all or part of the subject line you want to find.

To show only those messages from one user, type h login, where login is their login name. To display these messages, one after another, enter p login. For the example introduced earlier in this chapter, the command h peterp displays the headers of all messages received from peterp:

    N  12 peterp   Fri Mar 12 16:37   25/816   XTR work - can we hold meet
    U  11 peterp   Fri Mar 12 16:27   99/2154  status and milestones
        5 peterp   Fri Mar 05 14:45   38/1121  URGENT
You can specify messages by their number in the list of headers. There are also three special characters available for specifying messages:

^ the first message
. the current message
$ the last message

For example, to list all message headers from the current to the last message, type:

h .-$

A dash (-) is used to indicate a range of characters; a list of message numbers separated by spaces indicates individual messages. For example:

h ^ . $

displays the headers of the first, current, and last messages only. For the example used earlier in ``Setting environment variables'', the screen would show:

    N  12 peterp   Fri Mar 12 16:37   25/816   XTR work - can we hold meet
   >    1 susant   Fri Mar 05 09:30   12/345   Lunch?
Recall that the first message became the current message when you read it previously.

You can mix a range with individual message numbers:

h ^ 10-$

displays the first, the tenth, and all subsequent messages:

    N  12 peterp   Fri Mar 12 16:37   25/816   XTR work - can we hold meet
    U  11 peterp   Fri Mar 12 16:27   99/2154  status and milestones
       10 patsyk   Thu Mar 11 12:03   11/305   CA conference news
   >    1 susant   Fri Mar 05 09:30   12/345   Lunch?
You can also create a message list by specifying the type of messages in which you are interested. Type a colon followed by one of the following letters:

d deleted messages
n new messages
o old messages
r read messages
u unread messages

For example, to see a list of headers of the messages you have deleted, type:

h :d

Use an asterisk (*) if you need to specify all non-deleted messages. For example, to completely clean out your mailbox, use the save command with an asterisk and a filename to save all non-deleted messages to that file:

s * mail.old

The file that the messages are saved to is termed a ``mail folder''. You can use mail folders to group together messages on different subjects.

Changing the order of the header list

You can display message headers with the most recent message at either the top or the bottom of the list.

To list message headers with the most recent message at the bottom (that is, in chronological order), type set chron at the mail prompt. To list message headers with most recent numbers at the top, type set mchron.

To make your setting apply for all your mail sessions, add the line set chron or set mchron to your .mailrc file. For details on setting variables in the .mailrc file, see ``Setting environment variables''.


Next topic: Replying to a message
Previous topic: Quitting mail

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 26 May 2005