Using Electronic Mail on the local system

Using Electronic Mail on the Birmingham system

Author: L.S.Lowe. File: mailintro. This update: 20111017. Part of Guide to the Local System.

You can use electronic mail as a means of sending messages to other users of the local system, and to users of other computers, and receiving messages from other users.

To send e-mail, you need to know how to address your intended recipient. On the local system, you can simply use the userid of the recipient, which for us is usually based on their initials. In general, though, since we are part of the Internet network, you use Internet-form addresses. These use the following convention:


where localpart is usually just a username for the person concerned, such as a computer userid or a personal name, and systemname is the name of the computing system on which that username is known. Note that the systemname is an Internet domain-name, consisting of components separated by dots, written little-end first, and big-end (such as uk) last.

Your own electronic mail address is:

where user is your local computer userid, usually based on your initials.

Notice that is not actually the name of a machine, but is the generic name by which our research group is known for mail purposes. Do not tell your correspondents to use epdtxx or any other particular host name in your e-mail address: such e-mail will be refused. The idea is that, though machines may come and go, your e-mail address will remain the same.

For members of staff in our group, you can also address them as:

in other words, using their initials and surname, via the University central mailer. These names have been registered and set up to pass the mail on to their preferred computer account. This makes it easier for people in other parts of the School or University to send e-mail: they don't need to know which specific computer and userid to use.

What happens when you receive mail

This only applies to users who do not immediately forward all incoming email to another preferred account, such as, or, for example.

Any incoming e-mail identified as yours by the mail subsystem is stored in (appended to) your incoming mail folder, often called your inbox. This is a file which a mail client can refer to using the environment variable $MAIL. Its full name on our system is /home/mail/$USER/inbox, but you don't normally need to know that.

You can use alpine or another mail program to look at the incoming email, and print it, delete it, or save it elsewhere. The inbox folder is not really intended for the long-term storage of mail, as it would simply grow and grow to an unreasonable size, which would take longer and longer for a mail program to scan. Messages that you really want to store long-term are best moved/saved to other folders, using the facilities of your preferred mail client (eg alpine).

How do you know when you've got new mail? The system tells you. If you have a shell program running (whether from a simple ssh session, or in a window on an X-terminal), then the shell program periodically lets you know if you have new e-mail, just before it gives you a new prompt. If you have a mail program running which periodically checks and re-reads your inbox, then the mail program will itself tell you that it has received new mail.

If you're not logged on when the e-mail arrives, then you are informed when you next log on, just as above.

Other incoming folders

If your mail is set-up such that you may have other incoming mail folders, such as a spam folder, then incoming mail can arrive in these alternative locations, instead of just your standard inbox. This scenario (applying from December 2006) is described elsewhere.

Sendmail aliases (including sendmail mailing lists)

Our mailing subsystem (sendmail) supports sendmail-aliases. When an e-mail is received by our system, the recipient name is first looked up in the sendmail-alias database: if it is found there, then the mail is relayed to the mail target(s) configured for that name. For example, if someone sends to iam, a past user of our system, then the e-mail is relayed on to his new computer account elsewhere. In this way, we can handle mail for people who don't have actual accounts on our computer system.

Some useful local sendmail-aliases are epgroup, alicegroup, atlasgroup, na62group, lhcbgroup, and also epstaff, alicestaff, atlasstaff, na62staff, lhcbstaff, and epstud, alicestud, atlasstud, na62stud, lhcbstud.

There is the additional alias newstud for our current first-year students, but this is included in epstud and therefore also in epgroup: there is no need to specify it in addition to either of those.

There is the additional alias localusers, which corresponds to epgroup but excluding people who are known to be on LTA at CERN.

For example, you can announce something important to all members of the group by sending an e-mail to, or simply to epgroup if sending from the local Unix / Linux systems. If the information is only useful to those in Birmingham, such as for seminars and afternoon tea, just use localusers.

You can list the contents of one or more aliases (mailing lists) by entering, for example:

         praliases atlasstaff
If you aren't sure of an alias, enter the first few characters followed by a + character, to get a list, for example:
         praliases atlas+

The sendmail-alias database is maintained by L.S.Lowe.

Do not confuse sendmail-aliases with the aliases or nicknames used internally by alpine or other mail programs: they are not related.

Automatic mail redirection

Skip this section on a first reading!

When the mail system gets an e-mail targetted at your account, it looks to see if you have got a .forward file in the appropriate place: if you have, then the e-mail is relayed to the mail address(es) in that .forward file. For example, if you have a .forward file containing the text:

then you won't receive any e-mail on our computers: it will all be relayed to the specified e-mail address.

From December 2006, the required location of a .forward file on the Birmingham HEP system is directory /home/mail/$USER. Please ensure that the file there (if it exists at all) is a regular file and not a soft (symbolic) link to another file-system.

For your convenience, you can just one of enter:

         mailrule forward fred@some.dom
	 mailrule forward +fred@some.dom
         mailrule editforward
to setup your .forward file. For the first example, that email address will be forwarded to. For the second example, a local copy of emails will be kept as well. For the third example, you can directly edit the .forward file. The editor used is determined by the EDITOR environment variable.

The format of the .forward file allows multiple recipients: this is best done on a one-per-line basis, though you can also use a comma as a separator on a single line. Commas are not needed if you use one-per-line.

If you want to forward the emails but also keep a copy in your local system incoming email folder, then you need to put your own id in this file as an additional recipient, immediately preceded by a backslash: for example, \myid. The backslash means that this name is not to be processed through the alias and forwarding resolution code yet again, which would in principle lead to a recursion problem.

So if you have an account on our system, using a .forward file is a good way of redirecting mail. The alternative is to ask L.S.Lowe to modify the sendmail-alias database: you then lose the flexibility of personal control, but it's a sensible choice if it's to be permanent. Another choice is to use a procmail method which can give you control over which emails are forwarded: this is documented elsewhere.

Be careful to avoid mail loops when setting up redirection: if mail sent to you is redirected to another computer which then redirects it back, then you will never receive the e-mail, and after a few iterations the sender will get an error message about mail in a loop, and will have to resort to the telephone!

Mail errors

When sending an e-mail, most mail programs are rather quiet about the progress of the message out of the system. For example, mailx says nothing, and alpine just gives a Message sent line, which really only means that the mail has been queued within the local computer for the mail subsystem to handle.

If you are doubtful about the progress of an e-mail, but have received no mail messages telling you of an error, perhaps a first check is to see whether the mail has actually left our computer. You can do this by simply typing in mailq. Remember this only tests the local queue of incoming and outgoing mail, and not any queues at intermediate mail-relays, so absence of any locally queued mail does not confirm arrival at the destination.

If there is a problem with delivery of your message, you will receive an e-mail from the mail subsystem, or from a mail-relay en route, telling you of the error.

In the case of a multi-recipient message, it's particularly important to observe where such error messages come from (look at the From line at the top of the mail window) so that you know whether the problem is limited to just one or two recipients. Of course, the message from the mail-relay may say exactly what the problem is, if you read it carefully. If in doubt, consult L.S.Lowe.