17 lines
597 B
Bash
17 lines
597 B
Bash
|
#!/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_cert = </certs/${MAILDOMAIN}.crt\n \
|
||
|
ssl_key = </certs/${MAILDOMAIN}.key" > /etc/dovecot/conf.d/10-ssl.conf
|
||
|
#fi
|
||
|
|
||
|
dovecot -F
|