Forwarding, Sending, and Reading Mail on the CS Linux Machines
Introduction
(In this discussion, you should read "UNIX" as "UNIX and similar
operating systems such as Linux".)
If you send mail from your CS Linux account (for example, if
you submit program source code by mail using a command-line mail program),
you will usually get some sort of response
via e-mail (either an automated reply or a message
from the mail daemon telling you about a problem such as a mistyped
address).
This e-mail will be routed back to the sending account, however,
which means that you either need to
forward it to another account or
read it using a UNIX mail-reading program.
Forwarding mail under UNIX
It may be simplest just to forward mail from your CS account to
the address where you normally read mail (for most of you, your
TMail account).
To do this, create a text file
called .forward in your home directory containing
the address to which you want mail forwarded.
For example, if you want mail forwarded to your TMail account,
and your username is yourname,
this file should contain the single line of text
yourname@trinity.edu.
(To create a text file, use your favorite text editor,
such as vim.)
Permissions on this file should allow others to read it
but not change it; you can ensure this with the command
chmod go+r .forward.
Note that you won't normally see this file in a directory listing --
files beginning with a "." do not normally appear in
a UNIX directory listing (as produced by the command ls).
To see all files, including those beginning with a ".",
use the command ls -A.
To be sure permissions are set correctly, use the command
ls -l .forward; you should see output that looks something
like this:
-rw-r--r-- 1 yourname yourname 27 Jan 22 12:51 /users/yourname/.forward
(The important part is the first 10 characters, showing that you have
permission to read and change (write to) the file,
and everyone else has permission to read it but not change it.)
To check that forwarding is working properly, try sending a test message
from some other account -- your TMail account, for example -- to
yourname@cs.trinity.edu. The test message should arrive at the
address to which you've forwarded your CS mail within a few minutes
(assuming there are no network problems); if it does not, something
is probably wrong, and you should review the instructions and/or
ask for help.
Sending mail under UNIX
A quick way to send one file from UNIX is to use the
mutt command:
mutt [-s "subject"]
[-c cc_recipient] recipient
< filename
sends the contents of file filename as an e-mail
message to recipient, with a subject header of
subject. Also sends a copy to cc_recipient.
If the message cannot be delivered, you will get mail to
that effect, but the mail will be sent to your CS account
(so you should set up forwarding, as described above,
or learn how to read mail sent to your CS account, described
below).
To include attachments,
for each attachment add to the command -a filename,
and follow the last attachment with --.
Or you can simply use a Web-based mail (such as TMail),
which should allow you to access the local filesystem(s).
Reading mail under UNIX
If you do not forward mail from your CS account,
you should be able to retrieve it via IMAP or POP from
sol.cs.trinity.edu.
There are other options as well; talk to your instructor
or research supervisor.