rework mail domain stats

We can now show list count, alias count as well in the mail domains UI
This commit is contained in:
Girish Ramakrishnan
2025-12-05 12:54:48 +01:00
parent 425e196dfc
commit f714cd66f7
9 changed files with 106 additions and 163 deletions

View File

@@ -305,7 +305,7 @@ async function mailboxSearch(req, res, next) {
}
} else { // new sogo and dovecot listing (doveadm -A)
// TODO figure out how proper pagination here could work
const [error, mailboxes] = await safe(mail.listAllMailboxes(1, 100000));
const [error, mailboxes] = await safe(mail.listMailboxes(1, 100000));
if (error) return next(new ldap.OperationsError(error.message));
const results = [];
@@ -398,7 +398,7 @@ async function mailingListSearch(req, res, next) {
if (parts.length !== 2) return next(new ldap.NoSuchObjectError('Invalid CN'));
const name = parts[0], domain = parts[1];
const [error, result] = await safe(mail.resolveList(parts[0], parts[1]));
const [error, result] = await safe(mail.resolveMailingList(parts[0], parts[1]));
if (error && error.reason === BoxError.NOT_FOUND) return next(new ldap.NoSuchObjectError('No such list'));
if (error) return next(new ldap.OperationsError(error.message));