12345678910111213141516171819202122232425 |
- #! /usr/bin/env sh
-
- sed -e "s/POSTGRES_HOST/${POSTGRES_HOST}/" -i /etc/opendkim/opendkim.conf
- sed -e "s/POSTGRES_USER/${POSTGRES_USER}/" -i /etc/opendkim/opendkim.conf
- sed -e "s/POSTGRES_PASSWORD/${POSTGRES_PASSWORD}/" -i /etc/opendkim/opendkim.conf
- sed -e "s/POSTGRES_DB/${POSTGRES_DB}/" -i /etc/opendkim/opendkim.conf
- sed -e "s/OPENDKIM_PORT/${OPENDKIM_PORT}/" -i /etc/opendkim/opendkim.conf
- sed -e "s/MAIL_DOMAIN/${MAIL_DOMAIN}/" -i /etc/opendkim/KeyTable
-
- if [ ! -e /etc/opendkim/keys/dkim.private ]
- then
- cd /etc/opendkim/keys &&
- opendkim-genkey -s dkim -d "${MAIL_DOMAIN}"
- cd --
- fi
-
- sleep 5
-
- rm -f /var/run/rsyslogd.pid
- rm -f /var/run/opendkim/opendkim.pid
- service rsyslog start
- service opendkim start
- #/usr/sbin/opendkim -f -v -x /etc/opendkim.conf
- tail -f /var/log/syslog
|