Go to main content

Managing sendmail Services in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Automatically Rebuilding Configuration Files

If you have built your own copy of sendmail.cf or submit.cf, the configuration file is not rebuilt during the upgrade process. You can configure the sendmail service properties so that the sendmail.cf file is automatically rebuilt for you. You must have administrator privileges.

  • To set the sendmail properties to automatically rebuild the sendmail.cf file, issue the following commands:

    # svccfg -s sendmail
    svc:/network/smtp:sendmail> setprop config/path_to_sendmail_mc=/etc/mail/cf/cf/hostname.mc 
    svc:/network/smtp:sendmail> quit
  • Refresh and restart the sendmail service.

    # svcadm refresh svc:/network/smtp:sendmail 
    # svcadm restart svc:/network/smtp:sendmail

    The svcadm refresh command pushes the changes into the running snapshot. The svcadm restart command restarts the sendmail service using the new options.

To configure the sendmail-client service so that the submit.cf configuration file is rebuilt automatically from a custom.mc file, issue the following commands:

# svccfg -s sendmail-client:default
svc:/network/smtp:sendmail> setprop config/path_to_submit_mc=/etc/mail/cf/cf/submit-hostname.mc 
svc:/network/smtp:sendmail> exit
# svcadm refresh svc:/network/sendmail-client 
# svcadm restart svc:/network/sendmail-client