3.4.1 Invoking mail
General usage of mail program is:
| | mail [option...] [address...]
|
If [address...] part is present, mail switches to
mail sending mode, otherwise it operates in mail reading mode.
The program uses following option groups: See section 3.1.2 Mailbox.
Mail understands following command line options:
- `-e'
- `--exist'
- Return true if the mailbox contains some messages. Return false
otherwise.
This is useful for writing shell scripts.
- `-f[file]'
- `--file[=file]'
- Operate on mailbox file. If this option is not specified, the default
is user's system mailbox. If it is specified without argument, the
default is `$HOME/mbox'.
Please note, that there should be no whitespace between the
short variant of the option (`-f'), and its parameter. Similarly,
when using long option (`--file'), its argument must be preceded by
equal sign.
- `-F'
- `--byname'
- Save messages according to sender. Currently this option is not implemented.
- `-H'
- `--headers'
- Print header summary to stdout and exit.
- `-i'
- `--ignore'
- Ignore interrupts.
- `-m path'
- `--mail-spool=path'
- Set path to the mailspool directory
- `-n'
- `--norc'
- Do not read the system-wide mailrc file. See section 3.4.7 Personal and System-wide Configuration Files.
- `-N'
- `--nosum'
- Do not display initial header summary.
- `-p'
- `--print'
- `-r'
- `--read'
- Print all mail to standard output. It is equivalent to issuing following
commands after starting `mail -N':
- `-q'
- `--quit'
- Cause interrupts to terminate program.
- `-s subj'
- `--subject=subj'
- Send a message with a Subject of subj. Valid only in sending mode.
- `-t'
- `--to'
- Switch to sending mode.
- `-u user'
- `--user=user'
- Operate on user's mailbox. This is equivalent to:
with spool_path being the full path to your mailspool directory
(`/var/spool/mail' or `/var/mail' on most systems).
- `-?'
- `--help'
- Display a help message.
- `--usage'
- Display a short usage summary.
- `-V'
- `--version'
- Print program version and exit.
This document was generated
by Sergey Poznyakoff on December, 23 2004
using texi2html