diff --git a/dashboard/src/views/emails.js b/dashboard/src/views/emails.js index 5e54ebd09..96f6a55d9 100644 --- a/dashboard/src/views/emails.js +++ b/dashboard/src/views/emails.js @@ -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; }); }); }); });