MailboxHandler:

- check_quota(): deny creating an unlimited mailbox if domain quota is set
  (reported by idaho7 in IRC)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1736 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 10 years ago
parent 7bf5b74a47
commit 087dc34b01

@ -463,6 +463,8 @@ class MailboxHandler extends PFAHandler {
return true; # enforcing domain_quota is disabled - just allow it
} elseif ($limit['quota'] <= 0) { # TODO: CHECK - 0 (unlimited) is fine, not sure about <= -1 (disabled)...
$rval = true;
} elseif ($quota == 0) { # trying to create an unlimited mailbox, but domain quota is set
return false;
} else {
$table_mailbox = table_by_key('mailbox');
$query = "SELECT SUM(quota) FROM $table_mailbox WHERE domain = '" . escape_string($domain) . "'";

Loading…
Cancel
Save