We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9939190 commit dc562aaCopy full SHA for dc562aa
bin/v-add-mail-account-autoreply
@@ -44,7 +44,15 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account"
44
#----------------------------------------------------------#
45
# Add exim autoreply
46
echo -e "$autoreply" > $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg
47
-chown -R root:mail $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg
+
48
+# Set ownership and permissions
49
+if [ "$MAIL_SYSTEM" = 'exim' ]; then
50
+ mail_user=exim
51
+fi
52
+if [ "$MAIL_SYSTEM" = 'exim4' ]; then
53
+ mail_user=Debian-exim
54
55
+chown $mail_user:mail $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg
56
chmod 660 $HOMEDIR/$user/conf/mail/$domain/autoreply.$account.msg
57
58
0 commit comments