The following procedure shows you how to build a new configuration file.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
# svcadm disable -t network/smtp:sendmail
# cd /etc/mail/cf/cf # cp sendmail.mc myhost.mc
Select a new name for your .mc file.
For example, add the following command line to enable domain masquerading.
# cat myhost.mc .. MASQUERADE_AS(`host.domain')
Use the desired host name and domain name.
In this example, MASQUERADE_AS causes sent mail to be labeled as originating from host.domain, rather than $j.
# make myhost.cf
# /usr/lib/sendmail -C myhost.cf -v testaddr </dev/null
While this command displays messages, it sends a message to testaddr. Only outgoing mail can be tested without restarting the sendmail service on the system. For systems that are not handling mail yet, use the full testing procedure in How to Test the Mail Configuration.
# cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.save # cp myhost.cf /etc/mail/sendmail.cf
# svcadm enable network/smtp:sendmail