mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 20:41:53 -07:00
Fix v-unsuspend-mail-account
Fix 'Malformed value "unlimitedM"' after unsuspend mail account
This commit is contained in:
parent
e087a04f00
commit
a716a3f2cb
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ is_object_suspended "mail/$domain" 'ACCOUNT' "$account"
|
||||||
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
|
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
|
||||||
md5=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$MD5')
|
md5=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$MD5')
|
||||||
quota=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$QUOTA')
|
quota=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$QUOTA')
|
||||||
|
if [ "$quota" = 'unlimited' ]; then
|
||||||
|
quota=0
|
||||||
|
fi
|
||||||
sed -i "/^$account:/d" $HOMEDIR/$user/conf/mail/$domain/passwd
|
sed -i "/^$account:/d" $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||||
str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
|
str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
|
||||||
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
|
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue