Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




System Administration Guide: Network Services
Previous Next

Building the Configuration File

How to Build a New File shows you how to build the configuration file. Although you can still use older versions of files, the best practice is to use the new format.

For more details, refer to the following.

How to Build a New File

The following procedure shows you how to build a new configuration file.

Note - /usr/lib/mail/cf/ is now /etc/mail/cf/cf/

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Stop sendmail.
    # svcadm -t disable network/smtp:sendmail
  3. Make a copy of the configuration files that you are changing.
    # cd /etc/mail/cf/cf
    # cp

    Select a new name for your .mc file.

  4. Edit the new configuration files (for example,, as necessary.

    For example, add the following command line to enable domain masquerading.

    # cat

    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.

  5. Build the configuration file by using m4.
    # /usr/ccs/bin/make
  6. Test the new configuration file by using the -C option to specify the new file.
    # /usr/lib/sendmail -C -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.

  7. Install the new configuration file after making a copy of the original.
    # cp /etc/mail/ /etc/mail/
    # cp /etc/mail/
  8. Restart the sendmail service.
    # svcadm enable network/smtp:sendmail
Previous Next

  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire