An elementary form of computer-computer communication, which may well account for the majority of network use, is electronic mail. This is the exchange of ``messages'' or ``letters'' or ``email,'' with transmission over the communication network watched over by some Unix mail facility. In other words, the user puts a letter in the mail and the system delivers it in due course. This is less direct than the real-time communication provided by the Unix commands write and talk but is more universal and less of an intrusion into someone else's workspace.
Mail, combined with news groups and bulletin boards, has produced a new type of international communication and (pardon the expression) international networking which has redefined who we may think of as our fellow workers and colleagues. It has also changed long distance collaborations from being painful to being efficient and fun. So much fun, apparently, that studies have found people in a work setting sometimes going through a thousand pieces of mail a day and have found managers restricting other people's mail access in order to increase the progress on managed projects.
On most Unix systems you should be able to get into the most elementary mail system with the command mail, Mail, or mailx. Under The X Windows System you can use the X Mail Handler xmh which has a nice array of colors and buttons to help you keep your mail organized (you must still write that letter to your folks though). If you regularly use Emacs for editing, you may use it also for your mail handling; while not as colorful as xmh, it has a nice presentation, lets you do your mail work within your familiar editing environment, and permits an intermix of your mail and Unix files whether you want to or not
Remember, there are two purposes to these mail systems. First, they have editors which permit you to compose letters and then send them. Second, they have the ability to let you read your mail and save it in an orderly way. While it is easiest at first to keep these two functions separated in your mind, in practice they do get mixed (you can instantaneously reply to a letter as you are reading it or read some old mail while you are in the process of sending out new letters).
Remember, too, to be patient; handling mail from differing computer systems all over the world is one of the most complicated and error-prone activities for a computer to attempt. It requires many links along the way to work perfectly and all systems to agree on ever-changing protocols and naming conventions. Accordingly, problems are inevitable. When you face mail failures, do not just blame the lousy system. Record or print out the details given to you by the system and report all that information to your system administrator.
Also, it is often impossible, or nearly so, for mortals to figure out someone's mail address from the information given in the headers. Thus, it is a good habit to explicitly state your return address in your letters and to get your friends' full addresses before writing to them.
The Unix mail command allows you to read incoming mail, send
outgoing mail, and customize the way the mail system operates for you.
Find details in the man pages with:
% man mail
Once in the mail system, you issue subcommands to personalize the system. Alternatively, you can set the options and aliases in the .mailrc file in your home directory. Other mailers, such as emacs, also use this file.
The Unix mail command operates on two types of mailboxes, your system
mailbox, for example, /usr/spool/mail/rubin, and your personal
mailbox, /u/rubin/mbox. The system mailbox
contains mail which the system has received but about which you have
yet to do something. When you invoke a mail program, it automatically
saves in your personal mailbox all messages you have read-unless
you tell it otherwise. The messages remain (and the file space they
occupy gets larger and larger and larger) in your personal mailbox
until you file them elsewhere, or better yet, delete them. You put
them in order by storing them in ``folders'' provided by the mail
system or in your own (no doubt highly organized) file system. An
example of this is,
% mail loren Start letter to loren on your system. % mail tim pfink hank Start letter to 3 users. % mail ghe < junk.file Send file to ghe. % mail stetz@comphy Start letter to stetz on remote comphy. % mail firstname.lastname@example.org Start letter to Internet addressee jan. % mail List all incoming messages.
Note that you can use simple user names like loren or pfink only for local users (those with names in the /etc/passwd file) and for those distant users whose aliases have been stored in the .mailrc file; for example, ghe really is email@example.com.
To process your incoming mail, enter mail at the system
prompt. For each piece of mail in your system mailbox, the mail
program displays a one-line entry similar to the following:
% mail Enter mail system. Mail [5.2 UCB] Type ? for help. Hello. "/usr/mail/lance": 2 messages 2 new R 1 ken Thu Sep 17 14:36 "Meeting" Letter 1, R: read previously. M 2 ken Thu Sep 17 14:36 "Cancel Meeting" M M: stored in mailbox. U 3 pfink Thu Sep 23 4:36 "Book Done" U U: unread previously. >N 4 alw@bblu Thu Sep 17 5:06 "Delay" > N Current: >, new: N. & Prompt, give subcommand. &
Go to letter 1. & [rtn] [Ctrl-D] Exit, send message.