summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
Diffstat (limited to 'postfix')
-rwxr-xr-xpostfix/postfix.sh6
1 files changed, 3 insertions, 3 deletions
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