Computer Networks Practical #4
Computer Networks
Practical Exercises #4
These practical exercises accompany
Tutorial #4.
- When you receive mail on the departmental Unix systems, it is
stored in your system mailbox. This is a file in "mailbox format".
Examine your system mailbox and explain what "mailbox format"
looks like. In particular, how do you tell where one message ends
and the next begins? On some systems you can discover where your mailbox
is by typing
echo $MAIL
at the shell prompt.
- Note that if you don't normally receive
mail on the Unix systems, don't
worry too much about this exercise. On the other hand, maybe
you could look at the format of the files which your particular
mail agent uses to store messages.
- The "mail spooling" system on a Unix host can be examined using
the mailq command. Try it. Same proviso
as previous question.
- Investigate mail forwarding on the Unix systems. This is
done by creating a
.forward
file in your home directory,
containing the address you want your mail forwarded to. If you normally
connect to the university from an external ISP, you may wish to
set a .forward
containing your usual email address at
your ISP. That way, mail sent to all registered users on the Unix
systems will be delivered to you as well.
- Depending on which user agent you use for reading mail, you
can configure what happens when different MIME message types
are received. For example,
audio/basic
messages probably
cause a sound file player to be opened, whereas image/gif
normally opens an image viewer. Discover where this behaviour is
specified (possibly in a "Preferences" menu item) and customise it.
Can you control the MIME types of enclosures, or attachments,
which you send from your mail agent?
- (optional) One of the nicest things about using Unix for
reading your email is the range of tools available for processing
incoming mail. The best of these is
procmail
. Look up
procmail
and procmailrc
in the Unix man
pages and see what it can do for you. Have a look at the file
~pscott/.procmailrc
on the Unix systems (your
lecturer's personal procmail configuration) to see how he uses it.
Note same proviso as question 1.
- The SMTP protocol can be employed in useful ways by the average
network guru. For example, you can check on the validity of an email
address by telnetting to the SMTP port (25) and invoking the
VRFY
command. Similarly, you can expand an email
alias using the EXPN
command. Telnet to port 25 on
ironbark and VRFY
the username pscott
.
Then see if you can EXPN
the alias scott
- OK, time for some experimental computer science.
In the lecture, you saw a "by hand" SMTP session - telnetting to
port 25 and typing the SMTP commands to the remote server. Try it
yourself, and send a message to someone - perhaps even to yourself.
Be aware that every
electronic mail transaction is logged on all systems, so you would
be well advised to stick to local hosts, and addresses of people
you know.
Phil Scott