System Administration Guide: Resource Management and Network Services

Managing Mail Delivery by Using an Alternate Configuration (Task)

To facilitate the transport of inbound mail and outbound mail, the new default configuration of sendmail uses a daemon and a client queue runner. If you have disabled your daemon, you should perform the following task. For a detailed explanation, refer to New Configuration File, submit.cf.

How to Manage Mail Delivery by Using an Alternate Configuration of sendmail.cf

In the default configuration of sendmail, the client queue runner must be able to submit mail to the daemon on the local SMTP port. If the daemon is not listening on the SMTP port, the mail remains in the queue. To avoid this problem, perform the following task. For more information about the daemon and client queue runner and to understand why you might have to use this alternate configuration, refer to New Configuration File, submit.cf.

This procedure ensures that your daemon runs only to accept connections from the local host.

  1. Become superuser or assume an equivalent role.

    For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.

  2. Stop sendmail.


    # /etc/init.d/sendmail stop
    
  3. Make a copy of the configuration file that you are changing. You could copy either subsidiary.mc or main.mc, depending on your requirements. In this example, the subsidiary.mc file is used.


    # cd /usr/lib/mail/cf
    # cp subsidiary.mc myhost.mc
    

    myhost

    Select a new name for your .mc file.

  4. Edit the new configuration file (for example, myhost.mc).

    Add the following line before the MAILER() lines.


    # cat myhost.mc
    ..
    DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
    
    1. (Optional) If your host has an IPv6 local host address that is enabled, edit the new configuration file as follows.

      Add both of the following lines before the MAILER() lines.


      # cat myhost.mc
      ..
      DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
      DAEMON_OPTIONS(`NAME=NoMTA6, Family=inet6, Addr=::1')dnl
      
    2. (Optional) To see if your host has an IPv6 local host address that is enbled, run the following command.


      # /usr/sbin/ifconfig -a

      If IPv6 is enabled, you should see output that is similar to the following.


      lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
                    inet6 ::1/128
  5. Build the configuration file by using m4.


    # /usr/ccs/bin/make myhost.cf
    
  6. Install the new configuration file after making a copy of the original.


    # cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.save
    # cp myhost.cf /etc/mail/sendmail.cf
    
  7. Restart the sendmail service.


    # /etc/init.d/sendmail start