22 lines
462 B
Bash
22 lines
462 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
CHROOTSERV=$(awk '/^[0-9a-z]/ && ($5 ~ "[-yY]") { print $1; exit}' /etc/postfix/master.cf)
|
||
|
|
||
|
if [ -n "${CHROOTSERV}" ]; then
|
||
|
echo "The service $CHROOTSERV is configured to use chroot. Please change it in master.cf" >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
#Test config
|
||
|
echo -n "Checking configuration... "
|
||
|
postfix check || exit 2
|
||
|
echo "OK"
|
||
|
|
||
|
#Create aliases
|
||
|
echo -n "Creating new aliases..."
|
||
|
newaliases
|
||
|
echo "OK"
|
||
|
|
||
|
exec /usr/lib/postfix/sbin/master -c /etc/postfix -d # 2>&1
|
||
|
|