Configuring a domain mail server

Configuring a domain mail server provides users external to your organization a simple method for addressing mail to your users. That is, without a domain mail server, the mail address must specify a particular host in your organization.

For example sam@orange.widget.com, where widget.com is your organization's domain name, and orange is the host that sam uses. But with a domain mail server, users outside your organization can simply specify the user name and domain name, without having to know which host the user uses, for example, sam@widget.com.

To configure a domain mail server, use following procedure.

  1. Create a mail exchanger (MX) record and an address (A) record for the mail server black.widget.com:
    widget.com           IN    MX     10 black.widget.com
    widget.com           IN     A     192.10.143.9
    black.widget.com     IN     A     192.10.143.9
  2. Edit sendmail.cf on the mail server (black.widget.com) to add the domain alias (the w class):
    Cw $w $?D$w.$D$. widget.com
  3. Mail clients must know where to send their non-local mail, so edit sendmail.cf on each client to point to the mail server (the S macro):
    DRblack.widget.com
  4. Use the NameServOpt option to configure the sendmail daemon so everyone can use the MX records defined in the name server brown.widget.com.
  5. Add aliases for users in the domain that do not have accounts on the mail server using the aliases file, for example:
    sam:sam@orange.widget.com
    david:david@green.widget.com
    judy:judy@red.widget.com
    Note: Mailbox (MB) records can serve the same function.
  6. The serial number in the SOA Resource Record must be incremented because the database has been modified.
  7. Refresh the name server database by issuing the refresh -s named command.
  8. On the clients, run the refresh -s sendmail command to make the changes take effect.

There are other methods to configure a domain mail server. These procedures involve using mailbox (MB), mail rename (MR), and mail group (MG) records.