HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
r
readmail(1) readmail(1)
NAME
readmail - read mail from a mail folder or incoming mailbox
SYNOPSIS
readmail [-ahnp][-f folder][number-listpattern]
DESCRIPTION
The
readmail program displays messages from your incoming mailbox or a specified mail folder.
Within the elm mail system (see elm(1) with no operands and optionally the
-h or -n option, readmail
displays the appropriate headers and the body of the current message.
With the number-list operand and no options, readmail
displays the corresponding messages and a sum-
mary of the headers from your incoming mailbox.
With the pattern operand and no options,
readmail displays the first message that matches the pattern
and a summary of the headers from your incoming mailbox.
Options
readmail supports the following options.
-a Print all messages that match pattern. If no pattern was specified, this option is
ignored.
-f folder Use file folder for the operations instead of the incoming mailbox.
-h Include the entire header of the matched message or messages when displaying their
text. The default is to display the From:, Date:, and Subject: lines only.
-n Exclude all headers.
-p Put form feeds (Ctrl-L) between message headers. This is useful when printing sets
of messages.
Operands
readmail supports the following operands.
number-list A blank-separated list of the ordinal locations of messages in the mail file (i.e., their
"message numbers"), up to 25 at a time. The character
$ means the last message in
the mail file. Similarly,
* represents every message in the file (i.e., 123
... $)
The message numbers are sorted into ascending order. Thus,
132produces the
same output as 123.
pattern A string that is present in one of the messages. This pattern can be typed in directly
(no quotes) if the words are separated by a single space in the actual message. The
pattern matching is case sensitive, so Hello and hello are not equivalent. Leading
digits (on the first word) are not permitted; however, you can precede them with a
space and quote the entire string, if the space occurs in the message, as in
" 1st item of business"
.
EXAMPLES
If you are using
vi to reply to a message from within the elm mail system, you can insert the text of the
current message with the command:
:r !readmail
If you define an alias similar to:
alias rd=’readmail $ | page’ (Bourne, Korn, or POSIX shell)
alias rd ’readmail $ | page’ (C shell)
you can use it with a program such newmail to peruse mail as it arrives, without needing to start a mail
system (see newmail(1)).
AUTHOR
readmail was developed by HP.
Section 1−−820 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005