From dc562aa526e2a395a23aab065674221ac37e9fa9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 30 Sep 2013 10:29:33 +0300 Subject: [PATCH] Autoreply permission fix. Thanks to l170v --- bin/v-add-mail-account-autoreply | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index 20f5d7ad..d7faf161 100755 --- a/bin/v-add-mail-account-autoreply +++ b/bin/v-add-mail-account-autoreply @@ -44,7 +44,15 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account" #----------------------------------------------------------# # Add exim autoreply echo -e "$autoreply" > $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg -chown -R root:mail $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg + +# Set ownership and permissions +if [ "$MAIL_SYSTEM" = 'exim' ]; then + mail_user=exim +fi +if [ "$MAIL_SYSTEM" = 'exim4' ]; then + mail_user=Debian-exim +fi +chown $mail_user:mail $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg chmod 660 $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg