NEXT UP previous
Next: telnet

e-mail

Electronic mail (e-mail) is the primary mechanism used to communicate on a one-to-one basis between users on the same machine or, over a network, between users on separate machines.

Sending e-mail is conceptually very similar to sending ordinary postal mail. Anyone who needs to be reached by e-mail has to have an e-mail address, in the same way that in order to receive a letter you have to have a postal address.

Normally, your full postal address will start with your name and then give your house number, street name, town, area, and country. The address provides a hierarchy of information which is used when the mail is delivered, to get it closer and closer to its destination. In the same way, a user's e-mail address has a similar hierarchical structure. For example, my concider the ficticious e-mail address:

	chrisgibbs@soc.cardiff.ac.uk

In terms of the hierarchy, the information should be read right to left. This means that the first item is the country code - United Kingdom (Uk) in my case. All e-mail addresses, except those in the USA, have a country code. The USA is different because it is the default country if no code is given (after all, they did start it all off). Within the UK, the e-mail address is in the academic community (ac), specifically at Cardiff University (cardiff) and, within that, the School of Computing (soc).

If someone sent some e-mail to that address (assuming it actually exists which it does not) then, in effect, the machine at my local end acts like a post office, in that it receives and stores any incoming mail that is addressed to me until such time as I go to collect it. Similarly, the remote machine from which the mail was sent also acts like a post office for the sender of my message.

As well as passing through the source and destination machines an e-mail message with any distance to travel will probably pass through several other (post office) machines on the way, though the sender of the message need have no knowledge of these intermediate machines as the mail should be routed automatically. This idea is illustrated in Figure 1.

In general, e-mail addresses have the format:

	user@destination

where the sender need have no knowledge or control of the route taken by the messages. Sometimes, however, you may wish to specify a particular set of machines through which you want the mail to pass. This can be done by specifying the destination address and one or more relay machines as follows:

	user%destination%re1ay1@relay2

Using this syntax an e-mail message to user on the destination machine will be routed via relay2 and then relayi. Notice, that the list of machines is visited in right to left order and that the route contains only one @ symbol. The next machine for the mail to get to is the one to the right of the @ symbol. When the mail gets there the @ symbol and the following machine name are stripped from the mail route and then the rightmost % symbol is changed to an @ symbol and the mail is then routed on.

What we have considered so far is just the mail transport part of e-mail delivery - the way e-mail gets from machine to machine. Typically in a Linux installation the e-mail transport will be performed either by a program called smail or one called sendmail. For full Internet connectivity, the configuration of these two programs can be quite involved. Fortunately, several of the more complete Linux distributions come with simple scripts to configure the mail transport program to cover most simple situations.

I strongly recommend that you use one these configuration scripts if you need to set up e-mail for yourself. You should also take a look through the Linux Mail-HOWTO document, which highlights some common problems and solutions for various mail related programs.

In addition to an email transport program, you will also need to provide a means to read and post mail messages, i.e. an e-mail user interface program, or mail reader. There are many mail readers available to run under Linux, several of which are supplied with the main Linux distributions. The list includes:

My personal favorite is elm, but this is just through familiarity, since all the mail readers perform essentially the same task.


NEXT UP previous
Next: telnet