Chapter 2. How Internet Mail Works

The programs that users use to send and receive mail (often just called “mailers”) are formally called mail user agents (MUAs). They are concerned with providing a convenient mail interface for users. They display incoming mail that is in users’ mailboxes, assist the user in constructing messages for sending, and provide facilities for managing folders of saved messages. They are the “front end” of the mail system. Many different user agents can be installed, and can be simultaneously operational on a single computer, thereby providing a choice of different user interfaces. However, when an MUA sends a message, it does not take on the work of actually delivering it to the recipients. Instead, it sends it to a mail transfer agent (MTA), which may be running on the same host or on some local server.

Mail transfer agents do the job of transferring messages from one host to another, and, after they reach their destination hosts, of delivering them into user mailboxes or to processes that are managing user mailboxes. This job is complicated, and it would not be sensible for every MUA to contain all the necessary apparatus. The flow of data from a message’s sender to its recipient is as shown in Figure 2-1. However, when an application program or script needs to send a mail message as part of some automatic activity, it normally calls the MTA directly without involving an MUA.

Figure 2-1. Message data flow

Only one MTA can be fully operational on ...

Get Exim: The Mail Transfer Agent now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.