There are many different mail programs available, e.g., ucb mail, mh, elm, mush, plum, dxmail. Each of these `mailers' has different features, and not all of them are compatible. In particular, if you use dxmail it will move you mail messages into `folders', which may then make them difficult to access using other mailers.
A simple one (and one of the best) to practice with is mush (which stands for `Mail User's Shell'. Enter the mail program by typing
mush
To send mail to a user, use
mush> m fred@koala.harvard.edu Subject: Cold fusion Dear Fred, I was interested to hear of your experiments with cold fusion in high temperature superconductors... ^D cc:?> send, edit, delete?> s mush>Note the use of control-D to exit and send the message. Type control-C twice to abort sending a message. At the mush> prompt you can type ? to get a list of available commands, h to get a list of all the messages you have received, q to quit.
To send mail to users on newt you don't need to give the computer name, just the username.
To send a file to another user, use input redirection, i.e.,
mush -s "Here is the program you asked for" fred < test.f
As noted in the section on security, it is wise not to assume that e-mail is a secure form of communication (it isn't). Messages that you send may be distributed by the recipient to other people without your permission. Also, it is possible for malicious users to send mail that appears to originate from someone else.
To extract a copy of a mail message on a laser printer, do the following from within mush
s num file
where s stands for save, num is the number of the message that you want to print (you can specify a range of numbers, e.g., 20-23, or leave num off altogether if you want to extract a message that you have just read), and file is the name of a file that you want to store the message in. If you want to print the file you have just extracted, you can do it as a ``shell escape'' from within mush, e.g.,
!a2ps file|lpr
and your message will appear on the laser printer in due course. If the message is more than a few pages long, consider using the line printer instead (lpr -Pphys-a).
e-mail addresses are usually of the form user@node.domain, where user is the user's login name, node is the local name for the computer (e.g., newt), and domain gives the institution and country (e.g., .phys.unsw.edu.au). Some typical e-mail addresses are:
mcba@newt.phys.unsw.edu.au jsmith@atnf.csiro.au rjx@koala.harvard.edu ferrario@crisp.bitnetUsually the easiest way of finding someone's address is to ask them to mail you a message, and then examine the header.
A good way of checking to see if a particular machine exists is to use nslook:
nslook koala.hardvard.eduwill return an IP number for the machine if it exists and is reachable on the internet (this won't work for bitnet machines, or other networks that are not directly connected to the internet). nslook can also be used to find the name of a machine if you know its IP number.
To check if a particular user exists, try
f user@machine.domainwhich will also tell you when the person last logged in, and, possibly, when he/she last read mail.
To get a list of all the users currently logged on to a particular machine, try
f @machine.domain
Mail is delivered by a program called sendmail which is always running on the system. Incoming mail is placed in a `spool area', specifically a file called /var/spool/mail/user where user is the username for which the mail is directed. Some mail programs will move mail from the spool file into a subdirectory called Mail within your top-level directory; other mailers will tend to leave the mail in the spool file unless you specifically ask for it to be moved.
Most of the mailers listed in the introduction to e-mail can be programmed to perform exceedingly tricky tasks. For example, it is possible to automatically sort your incoming mail into folders on the basis of who it came from, or a line in the subject heading. You can automatically forward mail to multiple addresses, automatically reply to mail to indicate that you have received it, and automatically append a `signature' (usually your name and contact information) to any outgoing mail that you send. In fact, you can perform any imaginable task by writing scripts in your mailer's programming language. Both mush and elm are particularly powerful in this respect.