Fix postfix configuration for lmtp auth service. Change Variables 'smtpd_sasl_type' and 'smtpd_sasl_path'.

This commit is contained in:
Christoph 2017-03-31 16:59:35 +02:00
parent dc8d25905d
commit 3993b320a1
2 changed files with 12 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.swp
*.conf
dovecot*
log*

View File

@ -1442,7 +1442,7 @@ perl -i.ORIG -n -p -e "s#^([ ]*)\#?\ ?(protocol imap {)#\1\2\n\n\1 ssl_cert = <
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-imap.conf || _failed=true
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_max_userip_connections\ +=.*)#\1\#\# \2\n\1mail_max_userip_connections = $max_userip_connections#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-imap.conf || _failed=true
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_plugins\ +=.*)#\1\#\# \2\n\1mail_plugins = \\\$mail_plugins imap_quota autocreate#g" \
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_plugins\ +=.*)#\1\#\# \2\n\1mail_plugins = \\\$mail_plugins imap_quota#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-imap.conf || _failed=true
perl -i -n -p -e "s#^([ ]*)\#?\ ?(imap_client_workarounds\ +=.*)#\1\#\# \2\n\1imap_client_workarounds = delay-newmail#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-imap.conf || _failed=true
@ -1926,12 +1926,20 @@ if $_new ; then
## -
## - comment in:
## - #virtual_transport = dovecot
## - #dovecot_destination_recipient_limit = 1
## -
## - add:
## - change:
## - smtpd_sasl_type = dovecot
## - smtpd_sasl_path = private/dovecot-auth
## - virtual_transport = lmtp:unix:private/dovecot-lmtp
_failed=false
echononl "\tAdjust /etc/postfix/main.cf"
perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#\1\#\2\n\1smtpd_sasl_type = dovecot#" \
/etc/postfix/main.cf || _failed=true
perl -i -n -p -e "s#^(\s*)(smtpd_sasl_path\ *=.*)#\1\#\2\n\1smtpd_sasl_path = private/dovecot-auth#" \
/etc/postfix/main.cf || _failed=true
perl -i -n -p -e "s#^(\s*)(virtual_transport\ *=.*)#\1\#\2\n\1virtual_transport = lmtp:unix:private/dovecot-lmtp#" \
/etc/postfix/main.cf || _failed=true
perl -i-n -p -e "s#^(\s*)(dovecot_destination_recipient_limit.*)#\1\#\2#" /etc/postfix/main.cf || _failed=true