|
|
@@ -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
|