Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ binmail(1) — SunOS 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

biff(1)

write(1)

uucp(1C)

uux(1C)

xsend(1)

sendmail(8)

BINMAIL(1)  —  USER COMMANDS

NAME

/bin/mail − send or receive mail among users

SYNOPSIS

/bin/mail [ −i ] [ −p ] [ −q ] [ −f filename ]
/bin/mail [ −d ] [ −i ] [ −r name ] person ...

DESCRIPTION

Note: This is the old version 7 UNIX system mail program.  The default mail command is described in mail(1), and its binary is in the directory /usr/ucb. 

/bin/mail with no argument prints a user’s mail, message-by-message in last-in, first-out order.  /bin/mail accepts commands from the standard input to direct disposition messages. 

When persons are named, /bin/mail takes the standard input up to an end-of-file (or a line with just ‘.’) and adds it to each person’s ‘mail’ file.  The message is preceded by the sender’s name and a postmark.  Lines that look like postmarks are prepended with ‘>’.  A person is usually a user name recognized by login(1).

If there is any pending mail, login(1) tells you there is mail when you log in.  It is also possible to have the C-Shell, see csh(1) or the comsat daemon biff(1) tell you about mail that arrives while you are logged in.

OPTIONS

Printing Mail

−i continue after interrupts — an interrupt normally terminates the /bin/mail command and leaves the mail file unchanged. 

−p print messages without prompting for commands.  Exit immediately upon receiving an interrupt. 

−q quit immediately upon interrupt. 

−f filename
use filename as if it were the mail file. 

Sending Mail

−d deliver mail directly, don’t route the message through sendmail. This option is often used by programs that send mail.

−i continue after interrupts — an interrupt normally terminates the /bin/mail command and leaves the mail file unchanged. 

−r name
specify a string to appear as the name of the sender.

COMMANDS

?  print a command summary. 

EOT (control-D)
put unexamined mail back in the mail file and quit.

!command
escape to the Shell to do command.

− go back to previous message. 

+ go on to next message. 

newline
go on to next message.

d delete message and go on to the next. 

dq delete message and quit. 

m [ person ] ...
mail the message to the named persons (yourself is default). 

n go on to next message. 

p print message (again). 

q same as EOT. 

s [ file ] ...
save the message in the named files (‘mbox’ default). 

w [ file ] ...
save the message, without a header, in the named files (‘mbox’ default).  Delete the message from the list and go on to the next message. 

x exit without changing the mail file. 

FILES

/etc/passwdto identify sender and locate persons
/usr/spool/mail/∗incoming mail for user ∗
mboxsaved mail
/tmp/ma∗temp file
/usr/spool/mail/∗.locklock for mail directory
dead.letterunmailable text

SEE ALSO

biff(1), write(1), uucp(1C), uux(1C), xsend(1), sendmail(8)

BUGS

Race conditions sometimes result in a failure to remove a lock file. 

Any superuser can read your mail, unless it is sent by xsend(1).

Sun Release 2.0  —  Last change: 3 January 1984

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