From f50c068ecfbca639571b913d9ea2d9414f3ba832 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 5 May 2014 17:10:25 +0300 Subject: [PATCH] Fix for Debian/Ubuntu. MAIL_USER is now defined localy --- bin/v-add-mail-account-autoreply | 7 +++++++ bin/v-add-mail-account-fwd-only | 7 +++++++ bin/v-add-mail-domain | 7 +++++++ bin/v-add-mail-domain-dkim | 7 +++++++ func/main.sh | 7 ------- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index 67ae3fde..f04e9ed9 100755 --- a/bin/v-add-mail-account-autoreply +++ b/bin/v-add-mail-account-autoreply @@ -22,6 +22,13 @@ source $VESTA/func/main.sh source $VESTA/func/domain.sh source $VESTA/conf/vesta.conf +# Define mail user +if [ "$MAIL_SYSTEM" = 'exim4' ]; then + MAIL_USER=Debian-exim +else + MAIL_USER=exim +fi + #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-mail-account-fwd-only b/bin/v-add-mail-account-fwd-only index e09ade3f..303ab79f 100755 --- a/bin/v-add-mail-account-fwd-only +++ b/bin/v-add-mail-account-fwd-only @@ -21,6 +21,13 @@ source $VESTA/func/main.sh source $VESTA/func/domain.sh source $VESTA/conf/vesta.conf +# Define mail user +if [ "$MAIL_SYSTEM" = 'exim4' ]; then + MAIL_USER=Debian-exim +else + MAIL_USER=exim +fi + #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index d17b1185..8c6ce280 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -25,6 +25,13 @@ source $VESTA/func/main.sh source $VESTA/func/domain.sh source $VESTA/conf/vesta.conf +# Define mail user +if [ "$MAIL_SYSTEM" = 'exim4' ]; then + MAIL_USER=Debian-exim +else + MAIL_USER=exim +fi + #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-mail-domain-dkim b/bin/v-add-mail-domain-dkim index fa5811a5..7d391816 100755 --- a/bin/v-add-mail-domain-dkim +++ b/bin/v-add-mail-domain-dkim @@ -21,6 +21,13 @@ source $VESTA/func/main.sh source $VESTA/func/domain.sh source $VESTA/conf/vesta.conf +# Define mail user +if [ "$MAIL_SYSTEM" = 'exim4' ]; then + MAIL_USER=Debian-exim +else + MAIL_USER=exim +fi + #----------------------------------------------------------# # Verifications # diff --git a/func/main.sh b/func/main.sh index 3ea48fe3..f41d5db1 100644 --- a/func/main.sh +++ b/func/main.sh @@ -27,13 +27,6 @@ WEBTPL=$VESTA/data/templates/web DNSTPL=$VESTA/data/templates/dns RRD=$VESTA/web/rrd -if [ "$MAIL_SYSTEM" = 'exim4' ]; then - MAIL_USER=Debian-exim -else - MAIL_USER=exim -fi - - # Return codes OK=0 E_ARGS=1