From 419a9b0b1aa7d0ef5fc07106a5564648d6f51619 Mon Sep 17 00:00:00 2001 From: dpeca Date: Tue, 10 Jan 2017 12:43:28 +0100 Subject: [PATCH] Fix for DKIM key permission in v-change-domain-owner Fix is the same as for v-restore-backup - https://github.com/serghey-rodin/vesta/commit/7815539e915ec8f779c7158891261bdfaff41ee7 --- bin/v-change-domain-owner | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/v-change-domain-owner b/bin/v-change-domain-owner index 7a0f265b1..aba2eade8 100755 --- a/bin/v-change-domain-owner +++ b/bin/v-change-domain-owner @@ -144,6 +144,16 @@ if [ ! -z "$mail_data" ]; then find $HOMEDIR/$user/mail/$domain -user $owner \ -exec chown -h $user {} \; + # Checking exim username for later chowning + exim_user="exim"; + check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd) + if [ "$check_exim_username" -eq 1 ]; then + exim_user="Debian-exim" + fi + # Chowning mail conf files to exim user + find $HOMEDIR/$user/conf/mail/$domain_idn -user root \ + -exec chown $exim_user {} \; + # Rebuild config $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1 $BIN/v-rebuild-mail-domains $owner no