frequently disconnected. To accommodate this difference, many mail systems also include a mail delivery agent, or MDA. The MDA transfers mail to systems without permanent Internet connections. An MDA is similar to an MTA (see the following note), but does not handle deliveries between systems and does not provide an interface to the user.

NOTE

Procmail and Spamassassin are examples of MTAs; both provide filtering services to the MTA while they store messages locally and then make them available to the MUA or email client for reading by the user.

The MDA uses the POP3 or IMAP protocols for this process. In a manner similar to a post office box at the post office, POP3 and IMAP implement a 'store and forward' process that alleviates the need to maintain a local mail server if all you want to do is read your mail. For example, dialup Internet users can intermittently connect to their ISPs' mail servers to retrieve mail by using Fetchmail — the MDA provided by Fedora (see the section 'Using Fetchmail to Retrieve Mail,' later in this chapter).

The Mail User Agent

The mail user agent, or MUA, is another necessary part of the email system. The MUA is a mail client, or mail reader, that enables the user to read and compose email and provides the user interface. (It is the email application itself that most users are familiar with as 'email.') Some popular UNIX command-line MUAs are elm, pine, and mutt. Fedora also provides modern GUI MUAs: Evolution, Thunderbird, Mozilla Mail, Balsa, Sylpheed, and KMail. For comparison, common non-UNIX MUAs are Microsoft Outlook, Outlook Express, Pegasus, and Eudora.

The Microsoft Windows and Macintosh MUAs often include some MTA functionality; UNIX does not. For example, Microsoft Outlook can connect to your Internet provider's mail server to send messages. On the other hand, UNIX MUAs generally rely on an external MTA such as Sendmail. This might seem like a needlessly complicated way to do things, and it is if used to connect a single user to her ISP. For any other situation, however, using an external MTA provides you much greater flexibility because you can use any number of external programs to handle and process your email functions and customize the service. Having the process handled by different applications gives you great control over how you provide email service to users on your network, as well as to individual and SOHO (small office/home office) users.

For example, you could

> Use Evolution to read and compose mail.

> Use Sendmail to send your mail.

> Use xbiff to notify you when you have new mail.

> Use Fetchmail to retrieve your mail from a remote mail server.

> Use Procmail to automatically sort your incoming mail based on sender, subject, or many other variables.

> Use Spamassassin to eliminate the unwanted messages before you read them.

Basic Sendmail Configuration and Operation

Because Sendmail is the Fedora default client (and the mostly widely used client), the following sections provide a brief explanation and examples for configuring and operating your email system. As mentioned earlier, however, Sendmail is an extremely complex program with a very convoluted configuration. As such, this chapter covers only some of the basics. For more information on Sendmail, as well as other MTAs, see the 'Reference' section at the end of this chapter.

Sendmail configuration is handled by files in the /etc/mail directory, with much of the configuration being handled by the file sendmail.cf. The actual syntax of the configuration file, sendmail.cf, is cryptic (see the following example). In an attempt to make it easier to configure Sendmail, the sendmail.mc file was created. The following example belies that goal, however. The sendmail.mc file must be processed with the m4 macro processor to create the sendmail.cf file; the needs of that processor account for the unusual syntax of the file. You will learn how to use it later, and we see a Perl script that automates and simplifies the entire process. First, let's examine some basic configuration you might want to do with Sendmail.

NOTE

sendmail.cf has some strange syntax because of the requirements of the m4 macro processor. You do not need to understand the details of m4 here, but note the quoting system. The starting quote is a backtick (`), and the ending quote is simply a single quote ('). Also, the dnl sequence means to 'delete to new line' and causes anything from the sequence up to and including the newline character to be deleted in the output.

Here's a look at an excerpt from the sendmail.cf file:

CP.

# 'Smart' relay host (may be null)

DS

# operators that cannot be in local usernames (i.e., network indicators)

CO @ % !

# a class with just dot (for identifying canonical names)

C..

# a class with just a left bracket (for identifying domain literals) C[[

# access_db acceptance class

C{Accept}OK RELAY

C{ResOk}OKR

# Hosts for which relaying is permitted ($=R)

FR-o /etc/mail/relay-domains

And here's a quote from the sendmail.mc file for comparison:

dnl define(`SMART_HOST',`smtp.your.provider')

define(`confDEF_USER_ID',``8:12'')dnl

undefine(`UUCP_RELAY')dnl

undefine(`BITNET_RELAY')dnl

dnl define(`confAUTO_REBUILD')dnl

define(`confTO_CONNECT', 4m')dnl

define(`confTRY_NULL_MX_LIST',true)dnl

You can see why the file is described as cryptic.

Complicated email server setup is beyond the scope of this book; for more information on this topic, we suggest Sendmail, 3rd Edition by Costales and Allman, a 1,200-page comprehensive tome on Sendmail configuration. However, the following five sections address some commonly used advanced options.

Configuring Masquerading

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату