diff --git a/setup/mail-users.sh b/setup/mail-users.sh index a92dd2bd..3c70024b 100755 --- a/setup/mail-users.sh +++ b/setup/mail-users.sh @@ -26,6 +26,10 @@ source setup/functions.sh # load our functions source /etc/mailinabox.conf # load global vars source ${STORAGE_ROOT}/ldap/miab_ldap.conf # user-data specific vars +dovecot_setting() { + /usr/bin/doveconf $1 2>/dev/null | awk -F= '{gsub(/^ +/, "", $2); print $2}' +} + # ### User Authentication # Have Dovecot query our database, and not system users, for authentication. @@ -97,7 +101,7 @@ ln -sf /etc/dovecot/dovecot-ldap.conf.ext /etc/dovecot/dovecot-userdb-ldap.conf. # Have Dovecot provide an authorization service that Postfix can access & use. cat > /etc/dovecot/conf.d/99-local-auth.conf << EOF; service auth { - unix_listener /var/spool/postfix/private/auth { + unix_listener auth-postfix { mode = 0666 user = postfix group = postfix @@ -113,7 +117,7 @@ EOF # submission port. tools/editconf.py /etc/postfix/main.cf \ smtpd_sasl_type=dovecot \ - smtpd_sasl_path=private/auth \ + smtpd_sasl_path=$(dovecot_setting base_dir)/auth-postfix \ smtpd_sasl_auth_enable=no # ### Sender Validation