Explorar el Código

Fix suspend mail account quota

Marcos hace 8 años
padre
commit
7ea127f016
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      bin/v-suspend-mail-account

+ 3 - 0
bin/v-suspend-mail-account

@@ -47,6 +47,9 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account"
 
 if [[ "$MAIL_SYSTEM" =~ exim ]]; then
     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
     str="$account:SUSPENDED:$user:mail::$HOMEDIR/$user:$quota"
     echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd