Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mail(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

biff(1)

login(1)

mailx(1)

uucp(1C)

write(1)




mail(1) mail(1)
NAME mail - send mail to users or read mail SYNOPSIS mail [-e] [-ffile] [-p] [-q] [-r] [-t] address... ARGUMENTS address Specifies the address where the mail is to be sent. -e Causes mail not to be printed. An exit value of 0 is returned if the user has mail; otherwise, an exit value of 1 is returned. -ffile Causes mail to use file (e.g., mbox) instead of the default ``mailfile.'' -p Causes all mail to be printed without prompting for disposition. -q Causes mail to terminate after interrupts. Normally an interrupt only causes the termination of the message being printed. -r Causes messages to be printed in first-in, first-out order. -t Causes the message to be preceded by all addresses the mail is sent to. An address is usually a user name recognized by login(1). If an address being sent mail is not recognized, or if mail is interrupted during input, the file dead.letter will be saved to allow editing and resending. Note that this is regarded as a temporary file in that it is recreated every time needed, erasing the previous contents of dead.letter. DESCRIPTION mail without arguments, prints a user's mail, message-by- message, in last-in, first-out order. For each message, the user is prompted with a ?, and a line is read from the standard input to determine the disposition of the message: newline Goes on to next message. + Acts the same as newline. d Deletes the message and goes on to next message. p Prints the message again. January 1992 1



mail(1) mail(1)
- Goes back to the previous message. s [file]... Saves the message in the named file (mbox is default). w [file]... Saves the message, without its header, in the named file (mbox is default). m [address]... Mails the message to the named addresses (yourself is default). q Puts undeleted mail back in the mailfile and stops. EOT (CONTROL-d) Acts the same as the q option. x Puts all the mail back in the mailfile unchanged and stops. !command Escapes to the shell to perform command. * Prints a command summary. When address is named, mail takes the standard input up to an end-of-file (or up to a line consisting of just a .) and adds it to each address's mailfile. The message is preceded by the sender's name and a postmark. Lines that look like postmarks in the message, (i.e., From...) are preceded with a >. To denote a recipient on a remote system, prefix address by the system name and exclamation mark (see uucp(1C)). Everything after the first exclamation mark in address is interpreted by the remote system. In particular, if address contains additional exclamation marks, it can denote a sequence of machines through which the message is to be sent on the way to its ultimate destination. For example, specifying a!b!cde as a recipient's name causes the message to be sent to user b!cde on system a. System a will interpret that destination as a request to send the message to user cde on system b. This might be useful, for instance, if the sending system can access system a but not system b, and system a has access to system b. mail will not use uucp if the remote system is the local system name (i.e., localsystem!user). 2 January 1992



mail(1) mail(1)
The mailfile may be manipulated in two ways to alter the function of mail. The other permissions of the file may be read-write, read-only, or neither read nor write to allow different levels of privacy. If changed to other than the default, the file will be preserved even when empty to perpetuate the desired permissions. The file may also contain the first line: Forward to address which causes all mail sent to the owner of the mailfile to be forwarded to address. This is especially useful to forward all of a user's mail to one machine in a multiple machine environment. In order for forwarding to work properly, the mailfile should have mail as group ID, and the group permission should be read-write. When a user logs in, the presence of mail, if any, is indicated. Also, notification is made if new mail arrives while using mail. EXAMPLES The command: mail cj accepts whatever message is typed up to an EOF. The user cj will be notified that he has mail the next time he logs in. If you want to read mail that has been sent to you, simply type mail LIMITATIONS Conditions sometimes result in a failure to remove a lock file. After an interrupt, the next message may not be printed; printing may be forced by typing a p. FILES /bin/mail Executable file /etc/passwd File containing user addresses /usr/mail/user File containing incoming mail for user; i.e., the mailfile $HOME/mbox File containing saved mail January 1992 3



mail(1) mail(1)
$MAIL File containing pathname of mailfile /tmp/ma* Temporary file /usr/mail/*.lock Lock file for mail directory $HOME/dead.letter Unmailable text file SEE ALSO biff(1), login(1), mailx(1), uucp(1C), write(1) 4 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026