[9] | 1 | .TH MAIL 1
|
---|
| 2 | .SH NAME
|
---|
| 3 | mail \- send and receive electronic mail
|
---|
| 4 | .SH SYNOPSIS
|
---|
| 5 | \fBmail\fR [\fB\-epqr\fR] [\fB\-f\fR \fIfile\fR]
|
---|
| 6 | .br
|
---|
| 7 | \fBmail\fR [\fB\-dtv\fR] [\fB\-s\fR \fIsubject\fR] \fIuser\fR [...]
|
---|
| 8 | .br
|
---|
| 9 | .de FL
|
---|
| 10 | .TP
|
---|
| 11 | \\fB\\$1\\fR
|
---|
| 12 | \\$2
|
---|
| 13 | ..
|
---|
| 14 | .de EX
|
---|
| 15 | .TP 20
|
---|
| 16 | \\fB\\$1\\fR
|
---|
| 17 | # \\$2
|
---|
| 18 | ..
|
---|
| 19 | .SH OPTIONS
|
---|
| 20 | .FL "\-e" "Exit with status TRUE or FALSE to indicate if there is mail in mailbox"
|
---|
| 21 | .FL "\-p" "Print all mail and then exit"
|
---|
| 22 | .FL "\-q" "Quit program if SIGINT received"
|
---|
| 23 | .FL "\-r" "Reverse print order, i.e., print oldest first"
|
---|
| 24 | .FL "\-f" "Use \fIfile\fR instead of \fI/usr/spool/mail/user\fR as mailbox"
|
---|
| 25 | .PP
|
---|
| 26 | .FL "\-d" "Force use of the shell variable \fIMAILER\fR"
|
---|
| 27 | .FL "\-t" "Show distribution list as Dist: header in message"
|
---|
| 28 | .FL "\-v" "Verbose mode (passed on to \fIMAILER\fR)"
|
---|
| 29 | .FL "\-s" "Use Subject: \fIsubject\fR"
|
---|
| 30 | .SH EXAMPLES
|
---|
| 31 | .EX "mail ast" "Send a message to \fIast\fR"
|
---|
| 32 | .EX "mail" "Read your mail"
|
---|
| 33 | .EX "cat mail.cdiff | mail -s ''Here's the diff!'' asw " "Pipe program output to mail with a subject line"
|
---|
| 34 | .EX "mail -f /usr/spool/mail/asw" "How root can read asw's mail"
|
---|
| 35 | .SH DESCRIPTION
|
---|
| 36 | .PP
|
---|
| 37 | \fIMail\fR is an extremely simple electronic mail program. It can be used
|
---|
| 38 | to send or receive email on a single
|
---|
| 39 | \s-1MINIX 3\s-1
|
---|
| 40 | system, in which case it functions
|
---|
| 41 | as user agent and local delivery agent.
|
---|
| 42 | If the flag \fIMAILER\fR is defined in \fImail.c\fR,
|
---|
| 43 | it can also call a trans\%port agent to handle remote mail as well.
|
---|
| 44 | No such agent is supplied with
|
---|
| 45 | \s-1MINIX 3\s-1.
|
---|
| 46 | .PP
|
---|
| 47 | When called by \fIuser\fR with no arguments, it examines the mailbox
|
---|
| 48 | \fI/usr/spool/mail/user\fR, prints one message (depending on the \fB\-r\fR
|
---|
| 49 | flag), and waits for one of the following commands:
|
---|
| 50 | .PP
|
---|
| 51 | .nf
|
---|
| 52 | .ta 0.25i 1.25i
|
---|
| 53 | <newline> Go to the next message
|
---|
| 54 | \- Print the previous message
|
---|
| 55 | !command Fork off a shell and execute \fIcommand\fR
|
---|
| 56 | CTRL-D Update the mailbox and quit (same as q)
|
---|
| 57 | d Delete the current message and go to the next one
|
---|
| 58 | q Update the mailbox and quit (same as CTRL-D)
|
---|
| 59 | p Print the current message again
|
---|
| 60 | s [\fIfile\fR] Save message in the named file
|
---|
| 61 | x Exit without updating the mailbox
|
---|
| 62 | .PP
|
---|
| 63 | .PP
|
---|
| 64 | To send mail, the program is called with the name of one or more recipients as
|
---|
| 65 | arguments. The mail is sent, along with a postmark line containing the date.
|
---|
| 66 | For local delivery, a file named after each recipient in the directory
|
---|
| 67 | \fI/usr/spool/mail\fR must be writable. If a spool file does not exist for
|
---|
| 68 | a recipient it will be created.
|
---|
| 69 | .PP
|
---|
| 70 | If the directory \fI/usr/spool/mail\fR does not exist then the mail is
|
---|
| 71 | dumped on the console, so that system programs have a way to notify
|
---|
| 72 | a user on a system that does not have a mail spool.
|
---|
| 73 | .PP
|
---|
| 74 | The received mail contains a To: header showing the recipient. If there
|
---|
| 75 | are multiple recipients and the \fB\-t\fR option is specified each recipient
|
---|
| 76 | will also see a Dist: header line showing the other recipients.
|
---|
| 77 | .PP
|
---|
| 78 | The \fB\-s\fR option allows a subject to be specified. The subject must be
|
---|
| 79 | quoted if it contains spaces. If no subject is specified the mail
|
---|
| 80 | will be delivered with Subject: No subject.
|
---|
| 81 | .SH NOTES
|
---|
| 82 | The \fB\-s\fR option was added to make this simple mail program
|
---|
| 83 | consistent with mail programs found in other *nix variants. Many
|
---|
| 84 | programs, including the version of cron distributed with MINIX 3 releases
|
---|
| 85 | 2.0.3 and later, report their outcome by piping output to the mail
|
---|
| 86 | program in order to send a mail message to root in lieu of writing a
|
---|
| 87 | log file. Such programs often expect the mail program to accept a
|
---|
| 88 | subject line using this option.
|
---|
| 89 | .SH BUGS
|
---|
| 90 | If an external \fIMAILER\fR is used it is likely the conditional code
|
---|
| 91 | supporting this will need some editing to be made to work correctly.
|
---|
| 92 | .SH AUTHOR
|
---|
| 93 | The original mail program for MINIX 3 was written by Peter B. Housel.
|
---|
| 94 | The -e and -t options were added by C. W. Rose. The -s option was added
|
---|
| 95 | by A. S. Woodhull. This man page revised by ASW 2003-07-18.
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 |
|
---|