Configuring the Solaris-supplied version of Sendmail

In this example, I will configure the version of Sendmail (8.11.7) that was installed by default on a Solaris 8 system. Sendmail will be configured to use header sender and envelope sender address masquerading and a "smart host."

On Solaris 9, substitute for in the instructions.

1. Change to the directory containing the Sendmail configuration files.
cd /usr/lib/mail/cf

2. Make a copy of as, and make modifications to

3. Configure In this example, we want to use the "smart host" and masquerade both the header sender and envelope sender addresses as


Insert the following entries before the MAILER lines:

define(`SMART_HOST', `')

4. Build the file from the file.
# /usr/ccs/bin/m4 ../m4/cf.m4 >

5. Test the file.
/usr/lib/sendmail -bt -C./

Make sure that root is an "exposed user." An exposed user is a user that will not be masqueraded. This is used when accounts, such as root, are not unique across systems.

> $=E

Test header sender and envelope sender masquerading:
> /tryflags HS
> /try esmtp
Rcode = 0, addr =

> /tryflags ES
> /try esmtp
Rcode = 0, addr =

6. Backup the existing file.
cp /etc/mail/ /etc/mail/

7. Install the new file.
cp /etc/mail/

8. Sendmail the Sendmail process a SIGHUP to begin using the new configuration file.
kill -HUP `head -1 /var/run/`

Back to
Last modified: 03/17/2005