System Administration Guide: Resource Management and Network Services

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 (either subsidiary.mc or main.mc, depending on your requirements) that you are changing. 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 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
    
  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