25 lines
570 B
Bash
25 lines
570 B
Bash
|
#!/bin/ash
|
||
|
|
||
|
cat > /etc/dovecot/dovecot-ldap.conf.ext << LDAP
|
||
|
hosts = $LDAP_SERVER
|
||
|
auth_bind = yes
|
||
|
base = $LDAP_BASE
|
||
|
user_filter = (&(objectClass=posixAccount)(mail=%u))
|
||
|
pass_filter = (&(objectClass=posixAccount)(mail=%u))
|
||
|
user_attrs = \
|
||
|
=home=/var/vmail/%d/%u, \
|
||
|
=mail=maildir:/var/vmail/%d/%u/Maildir
|
||
|
LDAP
|
||
|
|
||
|
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
|
||
|
|
||
|
ln -s /etc/dovecot/dovecot-ldap.conf.ext /etc/dovecot/dovecot-ldap-userdb.conf.ext
|
||
|
|
||
|
dovecot -F
|