From 764a6117925274383aee22debe885e29ea4acbb4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 21 Feb 2015 00:27:17 +0100 Subject: Fix detect Postfix versions 2.10 and newer. --- postfix/postfix.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'postfix') diff --git a/postfix/postfix.sh b/postfix/postfix.sh index f0cde00..2aecd0d 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -44,10 +44,10 @@ confdir='/etc/postfix' postconf=/usr/sbin/postconf sp='[[:space:]]' pfver="$($postconf -d mail_version | cut -d= -f2 -s)" -echo "$pfver" | grep -q '2\.[2-9]' \ +echo "$pfver" | grep -qP '2\.([2-9]|1\d)(\.\d)?$' \ || exit1 "ERROR: Bad postfix version - this script is known to work only for postfix 2.2 and later" pf23= -! echo "$pfver" | grep -q '2\.[3-9]' || pf23=1 +! echo "$pfver" | grep -P '2\.([3-9]|1\d)(\.\d)?$' || pf23=1 if ! [ -d "$realmsdir" ]; then warn "Realms directory \"$realmsdir\" does not exist." fi @@ -340,6 +340,7 @@ if [ -n "$sslcert" ]; then $postconf -c "$tempdir" -e 'smtpd_sasl_auth_enable = no' # SASL is enabled explicitly with TLS transport $postconf -c "$tempdir" -e 'smtpd_sasl_security_options = noanonymous' $postconf -c "$tempdir" -e 'smtpd_sasl_local_domain = ' + -o smtpd_sasl_local_domain=\$mydomain $postconf -c "$tempdir" -e 'smtpd_tls_received_header = yes' $postconf -c "$tempdir" -e 'broken_sasl_auth_clients = yes' $postconf -c "$tempdir" -e 'tls_random_source = dev:/dev/urandom' @@ -434,7 +435,6 @@ submission inet n - n - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes - -o smtpd_sasl_local_domain=\$mydomain EOF addoroverwritewithindents $tempdir/master.cf '^pickup\h' << EOF pickup fifo n - - 60 1 pickup -- cgit v1.2.3