- cat /etc/courier/userdb/* >/etc/courier/exim
- chmod o-r /etc/courier/exim
- exim_dbmbuild /etc/courier/exim /etc/courier/exim.dat
- chgrp mail /etc/courier/exim.dat
- chmod o-r /etc/courier/exim.dat
+ VMAILDB=`domtool-config -path vmaildb`
+ if [ -z "$VMAILDB" ]; then
+ echo "domtool-config not found, not syncing courier vmail userdb"
+ exit 1
+ fi
+ /usr/bin/rsync -r --delete ${VMAILDB}/ /etc/courier/userdb
+ /usr/sbin/makeuserdb
+ /bin/chown -R domtool:nogroup /etc/courier/userdb
+ /bin/cat /etc/courier/userdb/* >/etc/courier/exim
+ /bin/chmod o-r /etc/courier/exim
+ /usr/sbin/exim_dbmbuild /etc/courier/exim /etc/courier/exim.dat
+ /bin/chgrp mail /etc/courier/exim.dat
+ /bin/chmod o-r /etc/courier/exim.dat
+ ;;
+ spamassassin)
+ SHAREDROOT=`domtool-config -path shared-root`
+ /usr/bin/rsync -r --delete ${SHAREDROOT}/email/spamassassin/addrs/ /etc/spamassassin/addrs
+ ;;
+ smtplog)
+ /bin/grep $2 /var/log/exim4/mainlog
+ ;;
+ apache-fixperms)
+ /bin/chown -R domtool:nogroup /var/log/apache2/user
+ ;;
+ apache1.3-fixperms)
+ /bin/chown -R domtool:nogroup /var/log/apache/user
+ ;;
+ users)
+ /bin/cp /var/domtool/waklog.conf /etc/apache2/
+ /etc/init.d/apache2 reload
+ ;;
+ firewall)
+ # Ideally this would check if the config worked first
+ # (ferm failing just uses the previous config at
+ # least). Does it need to chown/chmod the generated
+ # rules?
+ /bin/cp /var/domtool/firewall/*.conf /etc/ferm/
+ /etc/init.d/ferm reload