This repository has been archived on 2021-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
mail/dovecot/entrypoint.sh
2018-03-24 20:52:41 +00:00

21 lines
423 B
Bash
Executable file

#!/bin/ash
cat >> /etc/dovecot/dovecot-ldap.conf.ext << DOVECOTLDAP
hosts = $LDAP_SERVER
base = $LDAP_BASE
auth_bind = yes
pass_filter = (&(objectClass=posixAccount)(mail=%u))
DOVECOTLDAP
cat > /etc/dovecot/conf.d/10-ssl.conf << SSL
ssl = required
ssl_cert = <$TLS_FULLCHAIN
ssl_key = <$TLS_KEY
ssl_dh_parameters_length = 2048
SSL
[ -e /var/lib/dovecot/instances ] && rm -rf /var/lib/dovecot/instances
exec dovecot -F