18 lines
614 B
Bash
Executable file
18 lines
614 B
Bash
Executable file
#!/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
|
|
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
|
|
#fi
|
|
|
|
dovecot -F
|