mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 22:04:00 -07:00
Merge pull request #1988 from serghey-rodin/Skamasle-patch-9
Fix reset password from CLI / roundcube
This commit is contained in:
commit
fb9d3fddb0
1 changed files with 4 additions and 1 deletions
|
@ -52,8 +52,11 @@ salt=$(generate_password "$PW_MATRIX" "8")
|
|||
md5="{MD5}$($BIN/v-generate-password-hash md5 $salt <<<$password)"
|
||||
|
||||
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
|
||||
quota=$(grep $account $VESTA/data/users/${user}/mail/${domain}.conf)
|
||||
quota=$(echo $quota | awk '{ print $7 }' | sed -e "s/'//g" )
|
||||
quota=$(echo $quota | cut -d "=" -f 2 | sed -e "s/unlimited/0/g")
|
||||
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}M"
|
||||
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue