We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfd7b48 commit ca4c8b5Copy full SHA for ca4c8b5
1 file changed
bin/v-change-mail-account-password
@@ -55,9 +55,10 @@ salt=$(generate_password "$PW_MATRIX" "8")
55
md5="{MD5}$($BIN/v-generate-password-hash md5 $salt <<<$password)"
56
57
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
58
- quota=$(grep $account $HESTIA/data/users/${user}/mail/${domain}.conf)
59
- quota=$(echo $quota | awk '{ print $7 }' | sed -e "s/'//g" )
60
- quota=$(echo $quota | cut -d "=" -f 2 | sed -e "s/unlimited/0/g")
+ quota=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$QUOTA')
+ if [ "$quota" = 'unlimited' ]; then
+ quota=0
61
+ fi
62
sed -i "/^$account:/d" $HOMEDIR/$user/conf/mail/$domain/passwd
63
str="$account:$md5:$user:mail::$HOMEDIR/$user::userdb_quota_rule=*:storage=${quota}M"
64
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
0 commit comments