infra/playbooks/roles/mail/templates/user-patches.sh.j2

25 lines
785 B
Plaintext
Raw Normal View History

2024-03-22 18:43:42 -04:00
#!/bin/bash
postconf -e 'smtpd_sasl_type = dovecot'
postconf -e 'smtpd_sasl_path = /dev/shm/sasl-auth.sock'
postconf -e 'smtpd_sasl_auth_enable = yes'
2024-05-12 12:32:47 -04:00
#postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_relay_restrictions=permit_sasl_authenticated,reject'
postconf -e 'smtpd_delay_reject = yes'
postconf -e 'smtpd_client_restrictions = permit_sasl_authenticated, reject'
postconf -e 'smtpd_sasl_security_options = noanonymous'
2024-03-22 18:43:42 -04:00
echo 'auth_username_format = %Ln' >> /etc/dovecot/conf.d/10-auth.conf
2024-03-23 01:57:50 -04:00
echo 'username_format = %Ln' >> /etc/dovecot/dovecot-oauth2.conf.ext
echo "passdb {
driver = ldap
args = /etc/dovecot/dovecot-ldap.conf.ext
}
userdb {
driver = static
args = uid=5000 gid=5000 home=/var/mail/%u
}" > /etc/dovecot/conf.d/auth-ldap.conf.ext