All About Internet Mail
Software Summaries

BSD Mail (Unix)

Introduction

Introduction: Berkeley Software Distribution's BSD Mail (a.k.a. Berkeley Mail) for many years was the primary Internet email program. To many Internet email users it is simply known as "mail." BSD Mail's longevity probably has more to do with the past elitism of the Internet, where its membership was dominated by a technical priesthood thoroughly comfortable with the arcane ways of Unix. Newer, less technically-oriented Internet users rarely understand the attraction of BSD Mail when there are so many easier-to-use programs now available. Still, for many current Internet users, BSD Mail may be the first email program they encountered and learned. Whether they have religiously adhered to it or moved on to another program, it is the yardstick by which all others are measured.

On Unix Internet hosts, BSD Mail is universally available. It is a very mature application and therefore very reliable, with an enormous user support base. Its simplicity and consistency makes it relatively easy to teach and use. Combining operations with other Unix applications, the initiated can make BSD Mail go beyond its apparent limits. It is the Willys Jeep of Internet email applications: no frills or comforts, but it will get you there.

This is a program for seasoned Unix users. BSD Mail depends on knowledge of Unix editors. It is generally inflexible and unforgiving. It provides little or no chance to correct or even recover from mistakes. Even its most basic operations are not intuitive and many apparently simple tasks are dauntingly cumbersome.


Command Summary:

From Unix prompt (%)
% mail [return]Check your inbox. If there are messages waiting, BSD Mail will be launched, displaying a summary list of incoming messages. If the inbox is empty, will respond, "no mail for userid" and returns to the Unix prompt.
% mail address1 address2 etc Launch BSD Mail and open new message addressed to address1 etc.
Example        % mail jaffe@scilibx.ucsc.edu
After message is sent, will check inbox. If there are messages, will open summary list of incoming messages. If inbox is empty, will return to Unix prompt. For details of entering messages, see "& mail address1 address2" below.

 

From BSD Mail prompt (&)
& ? help; displays Mail Commands.
Mail Commands
t[message list] type messages
n go to and type next message
e [message list] edit messages
f [message list] give head lines of messages
d [message list] delete messages
s [message list] file append messages to file
u [message list] undelete messages
r [message list] reply to messages(to sender and recipients)
R [message list] reply to messages(to sender only)
pre [message list] make messages go back to /usr/mail
m[user list] mail to specific users
qquit, saving unresolved messages in mbox
xquit, do not remove system mailbox
hprint out active message headers
! shell escape
ch [directory] chdir to directory or home if none given
A [message list] consists of integers, ranges of same, or user names separated by spaces. If omitted, Mail uses the last message typed.

A [user list] consists of user names or distribution names separated by spaces. Distribution names are defined in .sendrc in your home directory.
& ~?Display list of ~ (tilde) commands, for information about added features and operations
& mail address1 address2 Begin new message, addressed to address1 etc. Example,

& mail jaffe@scilibx.ucsc.edu watson@scilibx.ucsc.edu

To send message to multiple addresses, enter each address separated by a space (no punctuation). Backspace (or delete) to make corrections. Press [return] when done entering addresses.

Subject: Enter phrase describing topic of message. Backspace (or delete) to make changes. Press [return] when done.

Message Body Enter text of message. Backspace (or delete) to make changes. Press [return] at end of each line.

 

Tilde Commands -- entered within message body at the beginning of a blank line.
~eOpen BSD Mail editor.
~vOpen vi editor.
~pRedisplay the text entered so far.
~r file.nameRead named file stored in a user's Unix account into the body of the message. To review added material, use ~p.
~m #Import the another message (indicated by #) into the body of an current message. To review added material, use ~p.

When done composing body of message, type . (period) at beginning of blank line, followed by [return].

Cc: Enter additional (carbon copy) addresses. To send message to multiple addresses, enter each address separated by a space (no punctuation). Backspace (or delete) to make corrections. Press [return] when done. [ctrl]-c Kill current message. You will be prompted to repeat the command to confirm this action. Killing a message dumps the text into a special file which you can retrieve and edit later.

  
& mail jaffe
Subject: test
This is an example of creating a message with BSD Mail.
.
Cc: jaffe steve
&

 

When Displaying Message Summary List

  
%  mail
Mail version 2.18 5/19/83.  Type ? for help.
"/usr/spool/mail/jaffe": 28 messages 27 new
  D  1 thagiwara@HALNET.COM Fri Sep  2 06:18  35/1462 "jomon figures,  
> N  2 TROLL@JUVOL.JULLIETTA.EDU Wed Sep  7 05:21  30/1604 "Re: jomon 
  N  3 bemba@URRMAIL.URC.EDU Wed Sep  7 06:12  19/979 "Re: frit"
  N  4 posen@CARELL.VRU.EDU Wed Sep  7 06:24  25/1093 "Re: T.S.P."
  N  5 TROLL@JUVCOL.JULLIETTA.EDU Wed Sep  7 06:38  17/807 "Re: T.S.P."
&

[spacebar]Display next screen of entries (if any).
[return] View current message (indicated by > in left-hand column of display).
#[return] View message indicated by #

 

When Viewing Messages
[spacebar] Display next screen of entries (if any).
[return] Move down one line.
dMark current message for deletion.
uRemove deletion mark.
[ctrl]-cInterrupt display of current message and then:
  • press [return] to move to the next message in the list,
  • select another message by number,
  • press h to redisplay the list of headers.
  • or give any other of the following commands.
dMark current message (indicated by >) for deletion. Marked items will display D at left-hand column. Messages will be removed on quitting Mail.
uRemove deletion mark.
R# reply to the original sender only, omitting the addresses of the other recipients. If no number (#) is specified, refers to current message.
r#reply to the original sender and all other recipients. If no number (#) is specified, refers to current message.
(Note: R and r are reversed in some systems, so find out settings at your location.)
Reply features are similar to those for composing new messages (see above).
forwardThere is no command for forwarding incoming messages. Instead, use the normal send sequence and insert (~m) the text of the original message.
w# file.nameExport body of message to text file specified by file.name. If no number (#) is specified, refers to current message. Using the name of an existing file will cause the text to be appended to the file.
s # file.nameExport message header and body to text file specified by file.name. If no number (#) is specified, refers to current message. Using the name of an existing file will cause the text to be appended to the file.
xExit Mail without changes. Deleted items are not removed (but deletion marks are kept).
qQuit and complete any pending business (i.e., remove items marked for deletion).


Source: All About Internet Mail . Berkeley : Library Solutions Press, 1997.
Copyright 1997 by Lee Jaffe
Do not reproduce without permission.