mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
updated mail counters
This commit is contained in:
parent
2c237a82dd
commit
c5746bea43
3 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,11 @@ rm -rf $HOMEDIR/$user/mail/$domain/$account
|
|||
# Update config
|
||||
sed -i "/ACCOUNT='$account'/d" $USER_DATA/mail/$domain.conf
|
||||
|
||||
# Decrease mail accounts counter
|
||||
accounts=$(wc -l $USER_DATA/mail/$domain.conf | cut -f 1 -d ' ')
|
||||
decrease_user_value "$user" '$U_MAIL_ACCOUNTS'
|
||||
update_object_value 'mail' 'DOMAIN' "$domain" '$ACCOUNTS' "$accounts"
|
||||
|
||||
|
||||
# Logging
|
||||
log_history "$EVENT"
|
||||
|
|
|
@ -48,6 +48,7 @@ rm -f /etc/exim/domains/$domain
|
|||
|
||||
# Updating config
|
||||
update_object_value 'mail' 'DOMAIN' "$domain" '$SUSPENDED' 'yes'
|
||||
sed -i "s/SUSPENDED='no'/SUSPENDED='yes'/g" $USER_DATA/mail/$domain.conf
|
||||
|
||||
# Logging
|
||||
log_event "$OK" "$EVENT"
|
||||
|
|
|
@ -47,6 +47,8 @@ ln -s $HOMEDIR/$user/conf/mail/$domain /etc/exim/domains/
|
|||
|
||||
# Updating config
|
||||
update_object_value 'mail' 'DOMAIN' "$domain" '$SUSPENDED' 'no'
|
||||
sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/mail/$domain.conf
|
||||
|
||||
|
||||
# Logging
|
||||
log_event "$OK" "$EVENT"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue