diff options
author | Jonas Smedegaard <dr@jones.dk> | 2004-05-07 13:21:45 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2004-05-07 13:21:45 +0000 |
commit | c34dc16e58db120244df710ec88e61503a0e3f7d (patch) | |
tree | a9334cd5699a0c56543fd7409a0b2808ab0c1724 | |
parent | 53470387da4f7d02ae0c68f4b3351381e06c3f6c (diff) |
Check if postfix-tls is installed.
-rwxr-xr-x | postfix/postfix.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index 7dd9dc1..beba3bd 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -3,7 +3,7 @@ # /etc/local-COMMON/postfix/postfix.sh # Copyright 2002-2004 Jonas Smedegaard <dr@jones.dk> # -# $Id: postfix.sh,v 1.27 2004-04-27 15:11:28 jonas Exp $ +# $Id: postfix.sh,v 1.28 2004-05-07 13:21:45 jonas Exp $ # # Auto-tweak plain installed postfix Debian package # @@ -24,6 +24,13 @@ pf2= if $postconf -d mail_version | grep -q '= 2'; then pf2=1 fi +pftls= +if [ -x /usr/lib/postfix/tlsmgr ]; then + pftls=1 +else + echo "Not enabling encryption: TLS-patched postfix required." + echo " (on Debian: install the package postfix-tls)" +fi # FIXME: We really want to check for at least 2.1.1 but that's tricky... sasl2= if saslauthd -v 2>&1 | grep -q '^saslauthd 2.1'; then @@ -94,7 +101,7 @@ fi # TLS breaks postfix if no SASL modules available (and doesn't make sense either) # (change the test if using some other modules and avoid the plain ones) -if [ -n "$sasl2" -a -f /etc/ssl/certs/postfix.pem ]; then +if [ -n "$pftls" -a -n "$sasl2" -a -f /etc/ssl/certs/postfix.pem ]; then mkdir -p $confdir/sasl echo 'mech_list: plain login' >$confdir/sasl/smtpd.conf echo 'minimum_layer: 0' >>$confdir/sasl/smtpd.conf |