This repository has been archived on 2021-02-06. You can view files and clone it, but cannot push or open issues/pull-requests.
mail/dovecot/entrypoint.sh

19 lines
401 B
Bash
Executable File

#!/bin/ash
if ! [ -e /etc/dovecot/dh-params/2048.pem ]; then
openssl dhparam -out /etc/dovecot/dh-params/2048.pem -2 2048
fi
cat >> /etc/dovecot/dovecot-ldap.conf.ext << EOF
auth_bind = yes
hosts = $LDAP_SERVER
base = $LDAP_BASE
dn = $LDAP_USER
dnpass = $LDAP_PASSWORD
tls = yes
pass_filter = (mail=%u)
EOF
[ -e /var/lib/dovecot/instances ] && rm -rf /var/lib/dovecot/instances
exec dovecot -F