1.5 Compiling sendmail with SASL Support - Administration
If you want to build or customize a sendmail configuration, you need to know your way around the sendmail distribution. This article will help you find your way around the cf directory, which contains the configuration files. It was excerpted from chapter one of The Sendmail Cookbook, written by Craig Hunt (O'Reilly Media, 2004; ISBN: 0596004710).
sendmail must be compiled with SASL support before it can be configured to offer the AUTH protocol extension.
Check the sendmail compiler options. If sendmail was compiled with the SASL flag, it does not need to be recompiled. If sendmail was not compiled with SASL support, add SASL to the -D flags used to specify compiler environment information, add sasl to the -l flags used to select libraries for linking, and recompile sendmail. After recompiling sendmail, reinstall and restart it.
Use the -d0.1 flag to check the compiler options of the sendmail binary. The SASL flag should be clearly shown in the “Complied with:” list, as in this example:
#sendmail -bt -d0.1 Version 8.12.9 Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETUNIX NEWDB PIPELINING SASL SCANF USERDB XDEBUG ============ SYSTEM IDENTITY (after readcf) ============ (short domain name) $w = chef (canonical domain name) $j = chef.wrotethebook.com (subdomain name) $m = wrotethebook.com (node name) $k = chef ======================================================== ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> >/quit
If the flag is not displayed, create a site.config.m4 file in the devtools/Site directory that contains the following commands:
Recompile, reinstall, and restart sendmail, as in this example:
# cd /usr/local/src/sendmail-8.12.9 # ./Build –c ...many lines of output deleted... # cd /usr/local/src/sendmail-8.12.9/sendmail # ./Build install ...many lines of output deleted... # kill -HUP `head -1 /var/run/sendmail.pid`
Recipes 1.2, 1.3, 1.4, 1.6, and 1.7 provide additional examples of compiling sendmail. Chapter 7 covers SASL and AUTH configuration. The sendmail book covers AUTH configuration in section 10.9 and compiling sendmail in section 2.2. See the sysadmin.html file in the SASL documentation directory for additional information about SASL configuration.