1. Trang chủ
  2. » Công Nghệ Thông Tin

Configuring Ubuntu Server As a Mail Server

32 380 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 32
Dung lượng 411,8 KB

Nội dung

CHAPTE R 10 Configuring Ubuntu Server As a Mail Server Sending and Receiving Mail Easily O ne of the most common functions of a Linux system is to serve mail Several Linux-based mail server programs are available for this purpose Several programs are available to accomplish this task In this chapter you will learn what is necessary to build a solution to send and receive e-mail on a network Because Ubuntu Server uses the Postfix mail server by default to send mail to other networks, this chapter covers Postfix Different solutions are available to allow users to connect to their mailboxes to fetch mail One of the easiest to use of these solutions is Qpopper, so that is the solution of choice in this chapter Understanding the Components of a Mail Solution If you want to understand what is needed to build a mail server that can handle e-mail for a complete network, you need to understand the three different agents that are used to process Internet e-mail: 249 250 C HAPTER 10 N CO NFIG U R ING U B U NTU S ER VER A S A M A I L S E R V E R s Mail transfer agent (MTA): This is the software that sends e-mail This e-mail is sent by the client that the user has used to compose and send the message This recipient MTA sends the e-mail to an MDA (defined next) Some well-known MTAs are Postfix, Sendmail, and qmail SMTP is an example of a protocol that can be used by an MTA to deliver e-mail s Mail delivery agent (MDA): The MDA works together with the MTA on the server that is used by the recipient The MDA makes sure the e-mail is stored in a location in which the user can access it Postfix comes with an integrated MDA as well s Mail user agent (MUA): After the mail is stored by the MDA, the MUA is the program that the user uses to read the mail The MUA can retrieve mail in several ways: by using a protocol such as IMAP or POP, remotely by using a file access protocol, or through access to local files When the MUA uses IMAP or POP, there always is a server component (for example, Qpopper) and a client component that is used by the client The core component of a mail solution is the MTA This component makes sure that mail can be exchanged by hosts on the Internet When sending mail on the Internet, the MTA analyzes the mail address of the recipient This mail address includes a reference to the DNS domain used by the client The MTA then contacts the authoritative DNS server of the recipient to find out which server is used as the MTA (“mail exchanger”) in that domain When the MTA knows which server to contact, it sends the mail over to the MTA of the recipient’s domain Once it arrives there, the MTA of the recipient checks whether the recipient is a user that exists on the local machine If so, the mail is handed over to the MDA, which stores the mail in the mailbox of that user If not, the MTA sends it to another MTA that helps to deliver the message to the mailbox of the recipient When the mail has been stored by the MDA in the mailbox of a local user, the user can access it in one of several ways, the most common of which is to use POP or IMAP If the user uses POP, the mail is transferred to the user, but the user can choose to keep the message on the server instead If IMAP is used, all messages are stored on the server and are not transferred to the client computer When setting up a mailbox for a user, an administrator can choose to make it either a POP mailbox or an IMAP mailbox In the following section you’ll read how to configure the Postfix MTA After that, you’ll learn how to set up Qpopper and Cyrus IMAPd to receive mail messages Configuring the Postfix MTA Postfix is a very modular mail server, comprising several programs that work together to make the Postfix mail server function This is in contrast to Sendmail, an alternative UNIX MTA The advantage of Postfix being a modular mail server is that it is easier for the C HA P TER 10 N C O N F I G U R I N G U B U N T U S E R V E R A S A M A I L S E R V E R administrator to manage all individual programs that comprise the Postfix mail server The disadvantage is that, as an administrator, you need to know how all these separate programs function Wietse Venema originally developed Postfix as a mail server that would be easier to administer and more secure than Sendmail Because it is monolithic, Sendmail is in general much harder to secure properly Postfix also is a very rich mail server that has many features NTip You can find a complete list of all Postfix features and instructions on how to configure them at dppl6++sss*lkopbet*knc+`k_qiajp]pekj*dpih How Postfix works as a modular mail server becomes clearer from a discussion of how mail traffic is handled by Postfix, so that is presented first After that, you will learn how to install and configure Postfix Handling Inbound and Outbound Mail Generally speaking, Postfix can handle two kinds of mail: inbound mail and outbound mail The inbound mail that Postfix handles may be messages sent from a local user to another local user or messages sent over the network to a local user The outbound mail that Postfix handles may be messages intended for a recipient on the same server as the sender, messages intended for a recipient on a remote server, or undeliverable messages Processing Inbound Mail from a Local User to Another Local User The following list explains how Postfix processes inbound mail, a graphical representation of which is shown in Figure 10-1: When Postfix receives mail that is sent by another local user, Postfix uses the lkop`nkl command to place the mail in the maildrop queue, to ensure that the mail stays on the same machine The le_gql daemon picks up the mail from the maildrop queue and checks whether the mail matches given rules regarding such things as the content, size, and other factors The le_gql daemon passes the e-mail to the _ha]jql daemon, which makes sure the mail is formatted in the proper way, by doing the following: 251 252 C HAPTER 10 N CO NFIG U R ING U B U NTU S ER VER A S A M A I L S E R V E R s 2EPLACESMISSINGHEADERLINESINTHEE MAILIFTHEMAILPROGRAMOFTHEENDUSER didn’t that already s $ELETESDOUBLERECIPIENTADDRESSES s 5SESTHEpnere]h)nasnepa daemon to convert the e-mail address in the header into a name in the proper qoan

Ngày đăng: 19/10/2013, 02:20

TỪ KHÓA LIÊN QUAN

w