Building Sendmail from scratch will not be covered on these web pages. The process of doing that is not complicated as you just unpack the source code, run Build and then Build install. If you're in a rush that's the quick and dirty method to coming up with a new binary for Sendmail. Ok, not that quick and dirty for a Solaris installation. If you point your browser to www.sendmail.org/vendor/sun, you'll notice that Sun does add some things to the basic Sendmail tarball before they compile their version. You can grab the source diff's and the Sun extensions (sun_compat.c module) to Sendmail from that web site.


Even though I won't be going through all the details of rolling your own version of Sendmail there are some things that I am going to mention nonetheless.


Sun has taken the time to build and install Sendmail for you. If an exploit does develop for Sendmail, Sun will issue a patch that you can apply to your system to address the exploit. In addition, each new revision of Solaris generally comes with the latest version of Sendmail already installed.


The current version of Sendmail can be found at http://www.sendmail.org/. After you've unpacked the source code, be sure to use pgp to verify that the contents of the tarball. Instructions for that can be found in the O'Reilly Sendmail book or on Sendmail's home page.


There are some files included in the tarball that you might want to look over. These include; README, RELEASE_NOTES, doc/op/op.ps, Install, and KNOWNBUGS. In addition, the contrib directory contains utilities submitted by other authors but those utilities are unsupported. Sun's version of Sendmail no longer run's as setuid root. This is also the case for Sendmail versions available from sendmail.org.


Instead, Sendmail now runs as user:group smmsp, which stands for SendMail Message Submission Program. If you decide to build your own version of Sendmail you can change these to any user:group that you desire or even have Sendmail go back to running as setuid root.


Sendmail now process's two message queues instead of just one. The Solaris version of sendmail runs a Message Submission daemon and an SMTP MTA daemon.


The normal port 25 mail queue is configured using the file, sendmail.cf. The message submission programs configuration file is submit.cf. Most files having to do with Sendmail now reside under the /etc/mail directory hierarchy.


Sendmail uses the m4 macro processor for building the Sendmail binary as well as for configuring Sendmail after it is installed. m4 is a macro language. A typical m4 line looks something like:


define(macro, value)dnl


All you need to do is to create a file with one macro per line and then feed this to the build script. m4 will interpret the configuration option and plug in the value that you supplied at the proper location. Consult www.sendmail.org or the Bat book (Sendmail by O'Reilly and Associates) for details on building your own version of Sendmail. All we need now is a list of macros and the values that they can contain.


Some of the m4 macros that you should be aware of when building your own version of Sendmail include:


confCC - defines which c compiler to use
confCCopts - command line switches for the c compiler
confDEPEND_TYPE - be sure to include Solaris
confINCDIRS - defines Include directories
confINSTALL - tells the compiler which program to use to install Sendmail
confLIBDIRS - defines where your library directories are located
confLDOPTS - other linker options


In addition to the basic compiler options you may want to investigate the following:


DNSMAP - allows you to query DNS. You also need to define NAMED_BIND to use this feature. If you want to use enhdnsbl (enhanced DNS Black Lists) for unsolicited commercial e-mail chores then you must set this option.


NAMED_BIND - enables DNS MX support. See DNSMAP above


DSN - Delivery Status Notification. Allows for delivery status notifications such as return receipts. To see if dsn is defined type, sendmail -bs and then type, EHLO SMTP, if 250-DSN is in the list, then it was defined.


LDAPMAP - enables openLDAP support


USING_NETSCAPE_LDAP - enables Sun ONE Directory Server support


LOG - Enables support for Syslog


MAP_REGEX - Enables regular expressions to match addresses


MATCHGECOS - Enables fuzzy name support


MILTER - Enables the mail filter program. Milter allows you to access external programs via sockets from Sendmail. This allows you to use third party programs to filter your e-mail. To see if Sun included support for Milter, use: /usr/lib/sendmail -bt -d0.4 </dev/null, look for "compiled with", milter should be in the list.


NDBM - This enables ndbm database support which is used primarily for the alias database but it could be used for other databases. This enables dbm type databases.


NETINET - Enables TCP/IP support
NETINET6 - Enables IPv6 support
NETISO - Enables an ISO 8022 Network
NETNS - Enables a Xerox NS Protocol Network
NETUNIX - Enables a Unix Domain Network
NETX25 - Enables an ITU X.25 network


NEWDB - enables Berkeley DB support if Berkeley DB is already installed on your system. The source code can be found at http://www.oracle.com/database/berkeley-db/index.html. Berkeley DB must be installed before compiling Sendmail. This enables hash and btree database support. This is preferred over NDBM.


NIS - enables NIS support


NISPLUS - enables NIS+ support


PIPELINING - With pipelining enabled, SMTP commands do not need to be synchronized.


SASL - enables SMTP AUTHentication - If you plan on utilizing this feature you need to install the Cyrus SASL library before compiling Sendmail. The SASL library can be found at ftp.andrew.cmu.edu/pub/cyrus-mail - be sure to configure the /usr/lib/sasl/Sendmail.conf file. Check the README file in the Cyrus SSL source directory for help with this.


STARTTLS - Enables Transport Layer Security support for Sendmail. You need to have openssl installed prior to using this option.


SYSTEM5 - Enables system 5 support


TCPWRAPPERS - Enables TCP Wrapper support if TCP Wrappers is already installed - the access database now essentially does the same thing.


To determine which features Sun chose when they compiled their version of Sendmail, use:


/usr/lib/sendmail -bt -d0.10 </dev/null /* -d zero period one zero */


Compare the output to the list above.


Additional help can be found by consulting the following files in the sendmail tarball:


cf/README
sendmail/README
cf/feature/*.m4
cf/mailer/*.m4
libmilter/docs/index.html
smrsh/README
devtools/README


Next Section: Configuration File Overview - 8 of 32



This Web Site Copyright © 1997 - 2010
by Alan Pae - All Rights Reserved