FreeBSD + SSL + SASL + AUTH + Sendmail Installation Manual

zhaozj2021-02-16  54

[1] Prepare file

OpenSSL-0.9.7c.tar.gz http://www.openssl.org/source/

Cyrus-sasl-1.5.28.tar.gz ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/

Sendmail.8.12.9.tar.gz

[2] Install OpenSSL

# tar -zxvf openssl-0.9.7c.tar.gz

# cd openssl-0.9.7c

# ./config --prefix = / usr --openssldir = / etc / ssl shared

# Make

# Make Test

# make install

# Strip / usr / bin / openssl /usr/lib/libcrypto.a /usr/lib/libssl.a

# CP-FR / ETC / SSL / MAN / USR

# rm -rf / etc / ssl / man

# ldconfig -v

[3] Install SASL

# Tar -zxvf cyrus-sasl-1.5.28.tar.gz

# cd cyrus-sasl-1.5.28.tar.gz

# ./configure -prefix = / usr --enable-login --enable-plain --enable-cram --enable-digest --with-pwcheck --disable-krb4 - disable-gssapi --disable-anon - -Disable-OTP

# Make

# make install

# echo "/ usr / lib / SASL" >> /etc/ld.so.conf

# ldconfig -v

# MKDIR / VAR / PWCHECK

# vi /usr/lib/sasl/sendmail.conf

PWCHECK_METHOD: SASLDB

[4] Add a secure authentication user

# / usr / sbin / saslpasswd zhangfl

[5] Installing Sendmail

# tar -zxvf sendmail.8.12.9.tar.gz

# cd sendmail-8.12.9

# vi devtools / site / site.config.m4

Appenddef (`conf_sendmail_envdef ',` -dsasl -dstarttls')

Appenddef (`conf_sendmail_libs ',` -lsasl -lssl -lcrypto')

Appenddef (`confenvdef ',` -dsasl')

Appenddef (`conflibdirs ',` -l / usr / lib / sasl')

Appenddef (`confincDirs ',` -i / usr / include')

# sh build -c

# CD CF / CF

# cp /etc/mail/freebsd.mc sendmail.mc

# vi sendmail.mc

Trust_auth_mech (`login plain cram-md5 digest-md5 ') DNL

Define (`confauth_mechanism", `login plain cram-md5 digest-md5 ') DNL

DNL Define (`Confdef_Auth_info ',` / etc / mail / auth / auth-info')

Feature (`NO_DEFAULT_MSA ') DNL

Daemon_Options (`port = 25, name = msa, m = ea ') DNLDEFINE (` Confcacert_path', `/ etc / ssl / certificate ') DNL

Define (`confcacert ',` /etc/ssl/certs/certificate-authority.crt'DNL

Define (`confserver_cert ',` /etc/ssl/certs/server.crt' )DNL

Define (`confserver_key ',` /etc/ssl/certs/server.key' )dnl

Define (`confprivacy_flags ',` goaway') DNL

# sh buildation sendmail.cf

# Sh Build Install-CF

# cd ../ ..

# sh bundall

[6] Server Configuration Certificate

# OpenSSL Req -new -Text -Out Cert.Req

# OpenSSL RSA -IN PrivKey.pem -out Cert.pem

# OpenSSL REQ -X509 -IN CERT.REQ -TEXT -KEY CERT.PEM -OUT CERT.CERT

# CP CERT.PEM $ PGDATA / Server.Key

# CP CERT.cert $ PGDATA / Server.crt

转载请注明原文地址:https://www.9cbs.com/read-21241.html

New Post(0)