|
GNU Mailutils |
General-Purpose Mail Package |
Official GNU Software |
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
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: .
Mail understands following command line options:
Return true if the mailbox contains some messages. Return false otherwise. This is useful for writing shell scripts.
Execute command before opening the mailbox. Any number of ‘--exec’ options can be given. The commands will be executed after sourcing configuration files (see section Personal and System-wide Configuration Files), but before opening the mailbox.
Operate on the mailbox given by the first non-optional command line argument. If there is no such argument, read messages from the user's ‘mbox’ file. See section Reading Mail, for more details about using this option.
Record outgoing messages in a file named after the first recipient. The name is the login-name portion of the address found first on the ‘To:’ line in the mail header. This option sets the ‘byname’ variable, which see (see byname).
Print header summary to stdout and exit.
Ignore interrupts.
Set path to the mailspool directory
Do not read the system-wide mailrc file. See section Personal and System-wide Configuration Files.
Do not display initial header summary.
Print all mail to standard output. It is equivalent to issuing following commands after starting ‘mail -N’:
print * quit |
Cause interrupts to terminate program.
Send a message with a Subject of subj. Valid only in sending mode.
Switch to sending mode.
Operate on user's mailbox. This is equivalent to:
mail -f/spool_path/user |
with spool_path being the full path to your mailspool directory
(‘/var/spool/mail’ or ‘/var/mail’ on most systems).
Display a help message.
Display a short usage summary.
Print program version and exit.
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.