smtp/init

30 lines
560 B
Plaintext
Raw Normal View History

2023-04-25 10:39:41 +00:00
#!/bin/sh
2017-07-23 07:56:38 +00:00
set -e
NAME="SMTP"
function stop {
echo "Stopping ${NAME}"
2018-01-31 11:56:02 +00:00
kill $(cat /run/saslauthd/saslauthd.pid)
kill $(cat /run/sendmail/mta/sendmail.pid|head -1)
2017-07-23 07:56:38 +00:00
}
trap 'stop' SIGTERM
2023-04-25 10:39:41 +00:00
if [ -z "$@" ]; then
if [ -z `hostname -d` ]; then
echo "You must start this container with --hostname= specifying a domain name"
exit 1
fi
2017-07-23 07:56:38 +00:00
2023-04-25 10:39:41 +00:00
#/usr/sbin/saslauthd -m /run/saslauthd -a pam
#cd /etc/mail && make && make && exec /usr/sbin/sendmail -q1h -bD &
newaliases
postfix start
/usr/sbin/opendkim -P /run/opendkim.pid -u opendkim -f
2017-07-23 07:56:38 +00:00
wait
else
exec $@
fi