opencrm/plesktest/add_sasl.sh

23 lines
790 B
Bash
Executable File

docker exec plesk-test bash -c '
# Entferne alte submission-Konfiguration falls vorhanden
sed -i "/^submission/,/^[^ ]/{ /^submission/d; /^ -o/d; }" /etc/postfix/master.cf
# Neue Konfiguration mit Dovecot SASL hinzufügen
cat >> /etc/postfix/master.cf << EOF
# Submission Port 587 für STARTTLS
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_type=dovecot
-o smtpd_sasl_path=/run/dovecot/auth-client
-o smtpd_sasl_security_options=noanonymous
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
EOF
postfix reload
echo "Done! Port 587 mit Dovecot SASL konfiguriert"
'