mail: consistently use disk size to calculate usage
In the mail overivew page, we use disk size In the per mailbox page, we use quota size
This commit is contained in:
@@ -438,8 +438,9 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
if (error) return console.error('Failed to fetch usage for domain', domain.domain, error);
|
||||
|
||||
domain.usage = 0;
|
||||
// quotaValue can be missing for deleted mailboxes that are on disk but removed from dovecot/ldap itself
|
||||
Object.keys(usage).forEach(function (m) { domain.usage += (usage[m].quotaValue || usage[m].diskSize); });
|
||||
// we used to use quotaValue here but it's quite different wrt diskSize. so choose diskSize consistently
|
||||
// also, quotaValue can be missing for deleted mailboxes that are on disk but removed from dovecot/ldap itself
|
||||
Object.keys(usage).forEach(function (m) { domain.usage += usage[m].diskSize; });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user