2018-11-20 17:13:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#if [ -n "${DATABASE_NAME}" -a -n "${DATABASE_USER}" -a -n "${DATABASE_PASSWORD}" ] ; then
|
|
|
|
echo -e "driver = mysql\n \
|
|
|
|
connect = host=db dbname=${DATABASE_NAME} user=${DATABASE_USER} password=${DATABASE_PASSWORD}\n \
|
|
|
|
default_pass_scheme = SHA512-CRYPT\n \
|
|
|
|
password_query = SELECT username as user, password FROM mailbox WHERE username='%u';" > /etc/dovecot/sql.conf.ext
|
|
|
|
#fi
|
|
|
|
|
|
|
|
#if [ -n "${MAILDOMAIN}" ]; then
|
2018-12-07 16:00:01 +00:00
|
|
|
echo -e "ssl = yes\n \
|
|
|
|
ssl_dh = </dh.pem\n \
|
|
|
|
ssl_cert = </certs/${MAILDOMAIN}.crt\n \
|
|
|
|
ssl_key = </certs/${MAILDOMAIN}.key" > /etc/dovecot/conf.d/10-ssl.conf
|
2018-11-20 17:13:09 +00:00
|
|
|
#fi
|
|
|
|
|
|
|
|
dovecot -F
|