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. Verify the hostname configuration.

    Run the check-hostname script to verify if sendmail will be able to identify the fully qualified hostname for this server:


    % /usr/lib/mail/sh/check-hostname
    hostname phoenix OK: fully qualified as phoenix.eng.acme.com

    If this script is not successful in identifying the fully qualified hostname, you need to add the fully qualified hostname as the first alias for the host in /etc/hosts.

  4. Restart sendmail and test your mail configuration.

    See "How to Test the Mail Configuration" for information.