diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index 67ae3fdee..f04e9ed93 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 e09ade3f9..303ab79f6 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 d17b11851..8c6ce2804 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 fa5811a5e..7d391816f 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 3ea48fe39..f41d5db14 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