Sendmail + Cyrus SASL for OmniOS

  1. OmniOS Dependencies
  2. # pkg install developer/gcc51 developer/pkg-config \
    developer/parser/bison developer/build/gnu-make \
    developer/object-file system/library/math system/header
       
  3. https://www.cyrusimap.org/sasl/
  4. $ env CFLAGS=-m64 LDFLAGS=-m64 CPPFLAGS=-I/usr/include/gssapi \
    ./configure --prefix=/opt/sasl2 --with-plugindir=/opt/sasl2/lib/sasl2 \
    --with-dbpath=/etc/opt/sasl2 --with-configdir=/etc/opt/sasl2 \
    --localstatedir=/var/opt/sasl2 --with-saslauthd=/var/run/saslauthd \
    --sysconfdir=/etc/opt/sasl2
       
  5. http://ftp.sendmail.org/
  6. $ cat devtools/Site/site.config.m4
    dnl ### 64-bit
    APPENDDEF(`confCCOPTS', `-m64')
    APPENDDEF(`confLDOPTS', `-m64')
    
    dnl ### Sun defines
    APPENDDEF(`confENVDEF', `-DNDBM -DNIS -DUSERDB -DMAP_REGEX')
    
    dnl ### Changes for STARTTLS support
    APPENDDEF(`confENVDEF',`-DLDAPMAP')
    APPENDDEF(`confLIBS', `-lldap')
    
    dnl ### Changes for STARTTLS support
    APPENDDEF(`confENVDEF',`-DSTARTTLS')
    APPENDDEF(`confLIBS', `-lssl -lcrypto')
    APPENDDEF(`confINCDIRS', `-I/usr/include/openssl')
    
    dnl ### SASL support
    APPENDDEF(`confENVDEF', `-DSASL=2')
    APPENDDEF(`conf_sendmail_LIBS', `-L/opt/sasl2/lib -R/opt/sasl2/lib -lsasl2')
    APPENDDEF(`confINCDIRS', `-I/opt/sasl2/include')
    
    dnl ### TCP Wrapper
    APPENDDEF(`confENVDEF', `-DTCPWRAPPERS')
    APPENDDEF(`conf_sendmail_LIBS', `-lwrap')
       
  7. /etc/mail/cf/cf/main.mc
  8. define(`VENDOR_NAME', `Berkeley')
    define(`confAUTH_OPTIONS', `A')dnl
    TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 PLAIN')dnl
    define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 PLAIN')dnl
    
    define(`confSERVER_CERT',`/etc/opt/sendmail/mail.crt')dnl
    define(`confSERVER_KEY',`/etc/opt/sendmail/mail.key')dnl
    DAEMON_OPTIONS(`Port=465, Name=TLSMTA, M=s')dnl
       
  9. /etc/init.d/sendmail-sasl
  10. #!/usr/sbin/sh
    #
    case "$1" in
    'start')
    /opt/sasl2/sbin/saslauthd -n 1 -V -a pam
    /opt/sendmail/sbin/sendmail -bd -q15m
    ;;
    
    'stop')
    kill `cat /var/run/sendmail.pid`
    kill `pgrep saslauthd`
    ;;
    
    *)
    echo "Usage: $0 { start | stop }"
    exit 1
    ;;
    esac
    EOF
       
  11. Watkins, Andrew. "Solaris 11: Setting up Sendmail / SASL to handle SMTP AUTH"

John D. Groenveld <groenveld@acm.org>
$Id: sendmail-sasl-tls.html,v 1.2 2017/08/30 22:42:05 jdg117 Exp jdg117 $