You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425
  1. #! /usr/bin/env sh
  2. replace_vars()
  3. {
  4. file="${1}"
  5. sed -e "s/DOVECOT_LMTP_PORT/${DOVECOT_LMTP_PORT}/" -i "${file}"
  6. sed -e "s/DOVECOT_SASL_PORT/${DOVECOT_SASL_PORT}/" -i "${file}"
  7. sed -e "s/EXIM_SMARTHOST_HOST/${EXIM_SMARTHOST_HOST}/" -i "${file}"
  8. sed -e "s/EXIM_SMARTHOST_USER/${EXIM_SMARTHOST_USER}/" -i "${file}"
  9. sed -e "s/EXIM_SMARTHOST_PASSWORD/${EXIM_SMARTHOST_PASSWORD}/" -i "${file}"
  10. }
  11. sed -e "s/connect *=.*/connect = host=${POSTGRES_HOST} dbname=${POSTGRES_DB} user=${POSTGRES_USER} password=${POSTGRES_PASSWORD}/g" -i /etc/dovecot/dovecot-pgsql.conf
  12. replace_vars /etc/dovecot/dovecot.conf
  13. replace_vars /etc/exim4/update-exim4.conf.conf
  14. replace_vars /etc/exim4/passwd.client
  15. rm -f /var/run/dovecot/master.pid &&
  16. rm -f /var/run/exim4/exim.pid &&
  17. service exim4 start &&
  18. dovecot -F