Skip to content

Commit c976136

Browse files
committed
Fix unlimited quota on unsuspend, thanks to @romkoll!
1 parent 11cb653 commit c976136

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/v-unsuspend-mail-account

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ is_object_suspended "mail/$domain" 'ACCOUNT' "$account"
4848
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
4949
md5=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$MD5')
5050
quota=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$QUOTA')
51+
if [ "$quota" = 'unlimited' ]; then
52+
quota=0
53+
fi
5154
sed -i "/^$account:/d" $HOMEDIR/$user/conf/mail/$domain/passwd
5255
str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
5356
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd

0 commit comments

Comments
 (0)