#!/bin/sh -e
+# grab tokens in case they were dropped by sudo
+if [ -x "$(which aklog)" ]; then
+ # ignore exit code, may fail on older versions
+ aklog || true
+fi
+
redo_exim() {
+ # FIXME: we're ignoring status of the touch command because we
+ # had to set mailman_domains.cfg immutable on mail relays not
+ # running mailman due to deficiencies on the domtool mailman
+ # plugin. Needs to be removed when not needed...
+ sudo -u domtool touch /var/domtool/local_domains.cfg /var/domtool/relay_domains.cfg /var/domtool/mailman_domains.cfg || true
/bin/echo -n "domainlist local_domains = " >/etc/exim4/conf.d/main/10_domtool-domains
/bin/cat /var/domtool/local_domains.cfg >>/etc/exim4/conf.d/main/10_domtool-domains
/bin/echo "" >>/etc/exim4/conf.d/main/10_domtool-domains
service bind9 restart
;;
exim)
+ sudo -u domtool touch /var/domtool/aliases /var/domtool/aliases.default
/bin/cp /var/domtool/aliases /etc/aliases.hosted
/bin/cp /var/domtool/aliases.default /etc/aliases.wildcard
redo_exim