System Administration Guide, Volume 3

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 superuser on the mail gateway.

  2. Change the configuration file.

    The following command copies and renames the main.cf file.


    # cp /etc/mail/main.cf /etc/mail/sendmail.cf
    
  3. Verify the host name configuration.

    Run the check-hostname script to verify if sendmail will be able to identify the fully qualified host name 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 hos tname, you need to add the fully qualified host name 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.