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

25 lines
608 B
Bash
Raw Normal View History

2018-03-08 15:45:31 +01:00
#!/bin/ash
2018-03-15 16:32:17 +01:00
cat >> /etc/dovecot/dovecot-ldap.conf.ext << DOVECOTLDAP
2018-03-08 15:45:31 +01:00
hosts = $LDAP_SERVER
base = $LDAP_BASE
2018-03-15 16:32:17 +01:00
auth_bind = yes
2018-03-08 15:45:31 +01:00
user_filter = (&(objectClass=posixAccount)(mail=%u))
pass_filter = (&(objectClass=posixAccount)(mail=%u))
2018-03-15 16:32:17 +01:00
#user_attrs = \
# =home=/var/vmail/%d/%n, \
# =mail=maildir:/var/vmail/%d/%n/Maildir
DOVECOTLDAP
2018-03-08 15:45:31 +01:00
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
2018-03-15 16:32:17 +01:00
echo -e "auth_verbose=yes\nauth_debug=yes\nauth_debug_passwords=yes" >> /etc/dovecot/dovecot.conf
2018-03-08 15:45:31 +01:00
2018-03-15 16:32:17 +01:00
exec dovecot -F