SMTP Authentication with Sendmail 8.12.10

These notes cover compiling Sendmail 8.12.10 with support for SMTP AUTH on a FreeBSD 4.4-RELEASE #0 system using version 1.5.28 of the Cyrus SASL library. I wrote them for my own reference, but they're here in case they help someone else with the same or a similar setup.

In retrospect, I probably could have avoided extra work (making the symbolic link to /usr/local/lib/sasl and including the /usr/local/* directories when compiling sendmail) by compiling Cyrus SASL with --prefix=/usr. Someone try it and let me know...

Some similar guides:

Other helpful information :

Installing Cyrus SASL

  1. Download Cyrus SASL 1.5.28. (The 2.x libraries aren't officially supported under Sendmail 8.12.10.)
  2. Extract into /usr/local/src and follow the directions in INSTALL. make with the --enable-login option if you want to support the non-standard LOGIN mechanism used by Outlook. make with --disable-krb4 and/or --disable-gssapi if you don't need support for kerberos.
  3. ln -s /usr/local/lib/sasl /usr/lib/sasl
  4. Create /usr/local/lib/sasl/Sendmail.conf, which might look like this:
    pwcheck_method: sasldb
  5. Create some users using /usr/local/sbin/saslpasswd (if using sasldb to check passwords).

Compiling Sendmail

  1. Download sendmail 8.12.10.
  2. Extract into /usr/local/src.
  3. Add the following lines to devtools/Site/site.config.m4:
    APPENDDEF(`confENVDEF', `-DSASL')
    APPENDDEF(`confINCDIRS', `-I/usr/local/include')
    APPENDDEF(`confLIBDIRS', `-L/usr/local/lib -L/usr/local/lib/sasl')
    APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
  4. Add the following lines to cf/cf/sendmail.mc (you may want to include fewer or more mechanisms than those listed):
    TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 GSSAPI KERBEROS_V4')
    define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 GSSAPI KERBEROS_V4')
  5. If you're including PLAIN or LOGIN as mechanisms, you should probably add:
    define(`confAUTH_OPTIONS', `p,y')
  6. Complete any other configuration and ./Build

Test Before Installing

Configuring Authentication for Your Users

Stay tuned...


Copyright 2003 Szarka Networks.
This work is licensed under a Creative Commons License.