Search This Blog

Tuesday, 17 January 2012

Configuring a Mail Server

Chapter 5: Configuring a Mail Server
Electronic mail is still the most important user service on the network. The Web carries a greater
volume of traffic, but e−mail is the service used for most person−to−person communication. And
person−to−person communication is the real foundation of business. No network is complete
without e−mail, and no network server operating system is worth its salt if it doesn't include full
TCP/IP mail support.
Simple Mail Transport Protocol (SMTP) is the TCP/IP mail transport protocol. Linux provides full
SMTP support through the sendmail program, although sendmail does more than just send and
receive SMTP mail. sendmail provides mail aliases and acts as a "mail router," routing mail from all
of the different user mail programs to the various mail delivery programs while ensuring that the mail
is properly formatted for delivery.
This chapter looks at your role in configuring each of these functions. Configuring sendmail can be a
large and complex task, but it doesn't have to be. Compared to some network server systems that
require a second installation just to install the SMTP server software, Linux distributions do a lot of
the configuration for you, and for most sites, the default configuration works fine. This chapter will
give you the information you need to make intelligent decisions about when and how to change the
default configuration.
sendmail configurations are built using the m4 macro processing language. The output of the m4
process is the sendmail.cf file, which is the configuration file read by sendmail. To fully understand
and manage sendmail, you need to understand its functions, the sendmail.cf file from which it reads
its configuration, and the m4 macros used to build that file. This chapter covers all three topics.
Using Mail Aliases
Mail aliases are defined in the aliases file. The location of the aliases file is set in the sendmail
configuration file. (You'll see this configuration file later in the chapter.) On Linux systems, the file is
usually located in the /etc directory (/etc/aliases), and it is occasionally located in the /etc/ mail
directory. The basic format of entries in the file is
alias
: recipient
The alias is the username in the e−mail address, and recipient is the name to which the mail should
be delivered. The recipient field can contain a username, another alias, or a final delivery address.
Additionally, there can be multiple recipients for a single alias.
sendmail aliases perform important functions that are an essential part of creating a mail server.
Mail aliases do the following:
Specify nicknames for individual users
addressed to special names, such as postmaster or root, to the real users that do
those jobs. When used in conjunction with the domain MX records covered in
Chapter 4, "Linux Name Services," aliases can be used to create a standard e−mail
address structure for a domain.
Nicknames can be used to direct mail

No comments:

Post a Comment