Mail Administration Guide

How to Set Up a Mail Gateway

A mail gateway manages communication with networks outside of your domain. The mailer on the sending mail gateway can match the mailer on the receiving system.

A good candidate for a mail gateway is a system attached to Ethernet and phone lines or a system configured as a router to the Internet. You might want to configure the mail host or another system as mail gateway. You might choose to configure more than one mail gateway for your domain. If you have UUCP connections, you should configure the system (or systems) with UUCP connections as the mail gateway.

  1. Become root on the mail gateway.

  2. Type cp /etc/mail/main.cf /etc/mail/sendmail.cf and press Return.

    This command copies and renames the main.cf file.

  3. Edit the /etc/mail/sendmail.cf file and make the following changes:

    1. Only if your relay mailer is not UUCP, change the default entry DMsmartuucp to the entry that is appropriate for your relay mailer.

      Available mailers are smartuucp (the default), ddn, ether, and uucp. If your relay mailer is UUCP, you do not need to change this entry.

      You can specify a different relay mailer for each mail gateway (if appropriate). You can define rule sets for other relay mailers in the main.cf file. See "Mailers" for a description of each of the default relay mailers.

    2. In the entry DR ddn-gateway, replace ddn-gateway with the name of your mail relay.

      The DR entry defines the mail relay.

    3. In the entry CR ddn-gateway, replace ddn-gateway with the name of your mail relay.

      The CR entry defines the class of the mail relay. You can designate one or more hosts as a member of this class.

    4. (Optional) Add a Dmmaildomain or Lmmaildomain entry to define the mail domain name to be used for mail delivery.

      The m macro defines the mail domain name. If the macro is not defined, the naming service domain name is used with the first component stripped off. For example, ecd.east.acme.com becomes east.acme.com. If you use the L command, sendmail looks up the name to use in the sendmailvars table, using maildomain as the search key.

    5. Save the edits.

  4. Reboot the mail gateway and test your mail configuration.

    See "Testing the Mail Configuration" for information.