Disentangle vmail from the mail node, Prepare for dovecot support
[hcoop/domtool2.git] / scripts / domtool-publish
index 9a9a01a..9eea020 100755 (executable)
@@ -57,6 +57,12 @@ case $1 in
                redo_exim
        ;;
        courier)
+               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