So far, you must have a basic understanding of the functions and construction of the Sendmail server. Next we will explain how to connect to the Sendmail server using a client program, MUA, in addition, you can manage and send emails. Currently, there are too many client mail software available on various platforms. Therefore, Due to space limitations, this section only describes "mail" on Linux and "Outlook Express" on Windows. You can select the most suitable MUA based on your platform and personal preferences.
6.2.1 send and receive emails by mail
Mail is the most traditional email management program in Unix and Unix-like operating systems. Although it is a tool for text interfaces, It is favored by many people because of its simple operation and complete functions, it is also the most commonly used email software.
To execute this program, you first need to log on to the server and then enter the mail command. The system will display the following screen:
[jack@ns1 ~]$ mail Mail version 8.1 6/6/93. Type ? for help. "/var/spool/mail/jack": 2 messages 1 new 2 unread U 1 root@ns1.fc5linux.co Sat Mar 25 09:49 17/677 "Meeting" >N 2 root@ns1.fc5linux.co Sat Mar 25 09:52 18/741 "Movie" & |
After you enter the mail command, the upper half of the information will contain the mail program version 8.1), email location/var/spool/Mail/jack, and mail count 2 messages), new mail 1 new), and did not read the letter 2 unread) and other information. The Mail list in the lower half contains many fields, which are described as follows:
? Letter status: The u table shows that the email has not been read Unread. N indicates that the New email is New. Blank indicates that the email has been read, and> indicates the selected email.
? Letter Number: All letters are identified by this number.
? Recipient: displays the recipient's email address.
? Time: the date and time when the email is sent.
? Email size: displays the size of this email.
? Mail title: displays the title text of this mail.
If you do not know the commands supported by the mail program, you can enter "?" after "&", To query the online help of the mail command.
& ? Mail Commands t
type messages
n goto and type next message
e
edit messages
…………
|
Note:Because there are many commands available in the mail program, this book only describes some of the most commonly used commands here, the rest of the part for your own research.
Read emails
To read a specified email, add the email number after the "&" symbol. The following is an example of reading 1st Emails:
& 1 # Read the content of 1st emails Message 1: From root@ns1.fc5linux.com Sat Mar 25 09:49:23 2006 # Sender Date: Sat, 25 Mar 2006 09:49:22 + 0800 # Mail date From: root
# Sender address
To: jack@ns1.fc5linux.com
# Recipient address
Subject: Meeting
# Mail title
# The email content is as follows:
Today too meeting will be hold at 3 in Room 209.
&
|
Show email list
If you want to select the desired email from the email list, you can add the h command Help after the "&" prompt symbol. The system displays the current email list:
& H # Displaying the email list > 1 root@ns1.fc5linux.co Sat Mar 25 17/677 "Meeting" N 2 root@ns1.fc5linux.co Sat Mar 25 18/741 "Movie"
|
Reply email
After reading an email, if you want to Reply to the sender's related information, you can add the r command Reply after the "&" symbol. The following content appears:
& R # Reply to Reply) email To: jack@ns1.fc5linux.com root@ns1.fc5linux.com # Reply address Subject: Re: Meeting # Automatically add the title "Re :" I will be there on time. # Reply content . # End the email content writing with the "." symbol Cc: # Copy recipients can press Enter to skip this step) |
Delete email
If some emails do not need to be retained, you can add the "d" command Delete after the "&" prompt symbol) and specify the mail number to Delete the emails. If you want to Delete multiple emails, the email numbers must be separated by blank spaces:
& H # Current email list > 1 root@ns1.fc5linux.co Sat Mar 25 17/677 "Meeting" N 2 root@ns1.fc5linux.co Sat Mar 25 18/741 "Movie" & D 1 # Delete an email numbered 1 & H > N 2 root@ns1.fc5linux.co Sat Mar 25 18/741 "Movie" # Emails numbered 1 have been deleted & Leave the mail program
|
You can add the q command Quit after the "&" prompt) to exit the mail program. If there is a new mail, the system will also prompt:
& Q # Exit the mail program New mail has arrived. Held 1 message in/var/spool/mail/jack # New emails |
Write email
Some readers may find it strange: Why can't I find the mail writing command after entering the mail program? In fact, the mail command itself can use parameters to write emails, and can complete all the required data in a single command line, such as the email address or topic.
If administrator root) to send an email with the subject of Movie to the jack@ns1.fc5linux.com, send the copy to the caroline@ns1.fc5linux.com, for example:
[Root @ ns1 ~] # Mail-s Meeting-c caroline@ns1.fc5linux.com jack@ns1.fc5linux.com # Enter the email content . # End email writing HTTP: caroline@ns1.fc5linux.com # Automatic copy address
|
In the example above, the-s parameter Subject refers to the Subject of the email, and the-c parameter Copy) specifies the recipient address of the Copy.
Note: The duplicate address of the BCC is a copy address that does not appear in emails from other recipients.
6.2.2 send and receive emails using Outlook Express
The mail program described above can read or manage emails only after logging on to the server, but sometimes we want to retrieve emails from the host and save them on our computer, to facilitate reading at any time. If the client has this requirement, POP or IMAP communication protocols must be installed on the mail host.
Nowadays, most users are accustomed to using mail software in Windows operating systems, such as Outlook Express, Netscape Messenger, and Eudora, to retrieve emails from the host and save them on the client computer.
Before using these software, you must install the POP or IMAP service on the server. Currently, the two are included in the dovecot package in Fedora Core 5, so we need to install dovecot first.
Install dovecot
Because Dovecot server software package is not installed in Fedora Core 5 by default), you must use the "Software Package Manager" to find the server software package named "dovecot", as shown in 6-8.
|
Figure 6-8 install the Dovecot server package |
After the installation is complete, run the following command to start dovecot:
[Root @ ns1 ~] #/Etc/rc. d/init. d/dovecot start Starting Dovecot Imap: [OK] |
After installing and setting dovecot on the server, this book uses Outlook Express as an example to describe how to use IMAP to connect to the mail host and read or download personal emails. The procedure and description are as follows:
1) Click the "Tools"/"Account" option in the functional column of the Outlook Express program. The "Internet account" window appears, and then click "add"/"email", as shown in 6-9.
|
Figure 6-9 Add an email account |