Sending and receiving e-mail
Notes:
Sending e-mail to another user on floppix:
-
Type: mail <username>
-
At the "Subject:" prompt, type in a subject and press [Enter]
-
Type in the message line by line
-
To send the message, press [Ctrl-d] at the beginning of a new line
-
A sample session sending mail could look like:
$ mail alterego
Subject: studying
Linux is fun
Remember our 2:00 meeting to do the mail lab
^D
Reading email
-
To read the email, login as alterego and type: mail
-
The mail program will show a list of messages:
----------------------------------------------------------
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/alterego": 2 messages 2 new
>N 1 student Sun Sep 20 13:00 14/395 "lab1"
N 2 student Sun Sep 20 13:01 14/409 "lab1 answers"
&
----------------------------------------------------------
-
Some mail commands:
-
To read message 2, type 2.
-
To delete message 2, type d2.
-
To reply to message 2, type r2.
-
To get help, type help or ?
-
To exit, type q
-
When you exit from mail with the q command, the messages that you have read
(and not deleted) will be saved in a file called mbox. Unread messages will
go back to the mail spool file.
-
To view the mbox file from the mail utility, open mail with the command:
mail -f
-
Mail messages that you have not picked up yet are saved in a spool file.
On floppix, the mail spool file is called /var/spool/mail/username
.
Sending/receiving e-mail - real mode
-
If you are connected to the Internet and you configured e-mail during the
startup, you can send and receive real e-mail.
-
Use mail to compose messages. If the message is addressed to a user
on another system it will be forwarded to your SMTP server.
-
Run fetchmail to download your mail from your POP3 server.
The mail will be downloaded to your local spool file; use mail to
read it. A copy of your mail will be left on the server so that you can also
download the messages with your normal email package.
-
The configuration file for fetchmail is .fetchmailrc which is stored in your
own home directory.
Exercises:
-
Send an email message to alterego.
-
Switch to another virtual console, login as alterego and read the mail messages.
Send a response.
-
Switch to the first virtual console (where you are logged in as yourself)
and read the response from alterego. Quit the mail program.
-
Check that you have now have a file called mbox in your home
directory.
-
What command to you use to re-read the message from alterego?
Copyright ©
L.M.MacEwan