Important note: if you are using any version of sendmail prior to
8.13.5, please upgrade immediately. The following procedure shows how to install sendmail 8.13.6.
1. Download sendmail.
2. Extract the sendmail tarball.
$ gzip -cd sendmail.8.13.6.tar.gz | tar xvf -
3. Edit devtools/Site/site.config.m4.
$ cd sendmail-8.13.6
$ vi devtools/Site/site.config.m4
This assumes you have the SFWbdb package installed. If this package is not installed, follow the Berkeley DB instructions below in "Installing sendmail on previous Solaris releases."
For STARTTLS support, add the following lines:
2. Extract the sendmail tarball.
$ gzip -cd sendmail.8.13.6.tar.gz | tar xvf -
Install Berkeley DB.
$ gzip -cd db-4.4.20.tar.gz | tar xvf -
$ cd db-4.4.20/build_unix
$ ../dist/configure
$ make
# make install
If your Solaris system does not have /dev/urandom (Solaris 8 and earlier), install the SUNrand package. This package contains a Solaris kernel module that emulates /dev/random and /dev/urandom to generate sufficient
entropy for STARTTLS support within sendmail. Note: Solaris 8
users may install Sun patch 112438
to create this device.
$ cd sendmail-8.13.6
$ vi devtools/Site/site.config.m4
For STARTTLS support, add the following lines:
For libmilter support, add the
following lines (the second line prevents a milter from running as
root):
6. Add directories to the default ELF library path, if applicable.
If compiling sendmail with hash database support, add /usr/local/BerkeleyDB.4.4/lib.
# crle -u -l /usr/local/BerkeleyDB.4.4/lib
If compiling sendmail with STARTTLS support, add /usr/local/ssl/lib.
# crle -u -l /usr/local/ssl/lib
The lines in bold are those I added to the default
generic-solaris.mc
configuration:
divert(0)dnl
VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro
Exp $')
OSTYPE(solaris2)dnl
DOMAIN(generic)dnl
FEATURE(access_db)dnl
FEATURE(blacklist_recipients)dnl
FEATURE(mailertable)dnl
MAILER(local)dnl
MAILER(smtp)dnl
define(`confCACERT_PATH',
`/etc/mail/certs')dnl
define(`confCACERT',
`/etc/mail/certs/CAcert.pem')dnl
define(`confSERVER_CERT',
`/etc/mail/certs/MYcert.pem')dnl
define(`confSERVER_KEY',
`/etc/mail/certs/MYkey.pem')dnl
define(`confCLIENT_CERT',
`/etc/mail/certs/MYcert.pem')dnl
define(`confCLIENT_KEY',
`/etc/mail/certs/MYkey.pem')dnl
define(`confPRIVACY_FLAGS',
`authwarnings,goaway,noetrn')dnl
define(`confTO_IDENT', `0')dnl
In our configuration, we are enabling the access and mailertable databases via the
FEATUREs in bold. The blacklist_recipients
feature allows us to also reject envelope recipients in addition to envelope senders.
The next six lines in bold are used for our STARTTLS configuration. If
you are not installing STARTTLS support, you will not need these lines.
The confPRIVACY_FLAGS line disables the EXPN, VRFY, and ETRN SMTP
commands.
The confTO_IDENT line prevents our server from sending ident
queries to remote mail servers when receiving mail. The ident queries attempt to
determine the owner of the remote mail server's process ID. In practice, ident
(TCP port 113) is disabled on most remote mail servers. Preventing
these queries can speed up receiving mail.
# chown root:root /etc/init.d/sendmail
# chmod 744 /etc/init.d/sendmail
3. Create or update sendmail database files.
$ cd /etc/mail
# touch access mailertable
# makemap hash access < access
# makemap hash mailertable <
mailertable
# newaliases
4. If you are using STARTTLS, create a STARTTLS certificate directory, copy the certificates to this directory, and configure file permissions. For information on creating SSL certificates for use with sendmail STARTTLS, please read Securing Sendmail with TLS.
# mkdir /etc/mail/certs
# mv CAcert.pem MYcert.pem MYkey.pem /etc/mail/certs
# cd /etc/mail/certs
# chmod 600 CAcert.pem MYcert.pem MYkey.pem
# chown root CAcert.pem MYcert.pem MYkey.pem
6. Start sendmail.
# /etc/init.d/sendmail start
Back to brandonhutchinson.com.