[EdCert previous] [EdCert next] [EdCert top]

Mail servers

A mail server, or mail hub, is a central server to handle all email traffic to and from a local network. Workstations on the network route all mail through the hub rather than routing it directly to the recipient. The hub rewrites the header of all of the outgoing messages so that they appear to come directly from the hub. Received mail is automatically routed to the hub and spooled there; none of the client workstations receive mail directly. There are a number of advantages to this system:

There are, however, some disadvantages as well:

Configuring a mail hub

Several things must be done to configure a mail hub:

Client configuration

To configure a client machine on a network using a mail hub, there are two basic things that must be done:

This is accomplished by making a special client sendmail.cf. How this is done will vary between versions of sendmail. Generating this file by hand can be complex, and varies between versions of sendmail. However, it is also possible to generate this file using M4, as outlined in the section on Configuring sendmail. Here is the M4 code that would be used to generate a client sendmail.cf:
	include(`../m4/cf.m4')
	VERSIONID(`$Id: servers.html,v 1.4 1996/09/03 22:45:17 uthuppur Exp $')
	OSTYPE(unknown)
 
	MASQUERADE_AS(indiana.edu)
	FEATURE(always_add_domain)
 
	EXPOSED_USER(root)
	EXPOSED_USER(postmaster)
	EXPOSED_USER(MAILER_DAEMON)
 
	FEATURE(nullclient, mail-relay.indiana.edu)
Here, indiana.edu would be replaced with the name of the mail hub.

DNS configuration

In order to have mail addressed to client machines automatically delivered to the hub, MX records must be created for each client machine. The MX record for each client machine should point to the mail hub. If name service is administered off-site, you will have to ask your DNS administrator to make these changes.

The primary file for your DNS zone should contain entries for each client machine. They will look something like this:

client_hostname		IN	A	123.45.6.7
			IN	HINFO	SPARC 10 Solaris
A new MX record should be added immediately after the A record, pointing to the mail hub:
client_hostname		IN	A	123.45.6.7
			IN	MX	10 mail_hub
			IN	HINFO	SPARC 10 Solaris
The "10" in the MX record specifies the priority of the mail exchanger; this only comes into play if there is more than one MX record. Because only the hub will be handling mail, each client machine will have only one MX record, pointing to the hub.

After the file has been reconfigured, the SOA record must be updated and the nameserver must be told to reload the file. For more details, see your DNS documentation.

Hub configuration

Although MX entries allow mail addressed to a client to be redirected to the hub, this is not sufficient by itself; since the mail is still addressed to the client, the hub will attempt to deliver the message to the client and fail. There are two ways to solve this problem:

Mail spool configuration

If the mail spool is to be accessed on multiple machines, it must be exported to each of the client machines, and the fstab or vfstab on each client machine must be modified to automatically mount the mail spool. For details on how to do this, see the sections on NFS in Integrating Your Machine with the Network

Terms used: mail server, mail hub, sendmail, sendmail.cf, DNS, MX record, NFS, m4.



[EdCert previous] [EdCert next] [EdCert top]