From 2f73044746976c397265ffab43fc5bbb587d3a32 Mon Sep 17 00:00:00 2001 From: dpeca Date: Wed, 25 Jan 2017 14:47:32 +0100 Subject: [PATCH] Wrong order of steps in v-change-domain-owner, fixed --- bin/v-change-domain-owner | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/v-change-domain-owner b/bin/v-change-domain-owner index e16c86291..8f2673073 100755 --- a/bin/v-change-domain-owner +++ b/bin/v-change-domain-owner @@ -144,6 +144,11 @@ if [ ! -z "$mail_data" ]; then find $HOMEDIR/$user/mail/$domain -user $owner \ -exec chown -h $user {} \; + # Rebuild config + $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1 + $BIN/v-rebuild-mail-domains $owner no + $BIN/v-rebuild-mail-domains $user + # Checking exim username for later chowning exim_user="exim"; check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd) @@ -155,11 +160,6 @@ if [ ! -z "$mail_data" ]; then find $HOMEDIR/$user/conf/mail/$domain -user root \ -exec chown $exim_user {} \; fi - - # Rebuild config - $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1 - $BIN/v-rebuild-mail-domains $owner no - $BIN/v-rebuild-mail-domains $user fi # Update counters