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
+2 -2
View File
@@ -360,7 +360,7 @@ describe('Ldap Server', function () {
const LIST_NAME = 'devs', LIST = `devs@${domain.domain}`;
before(async function () {
await mail.addList(LIST_NAME, domain.domain, { members: [ mailbox , 'outsider@external.com' ], membersOnly: false, active: true }, auditSource);
await mail.addMailingList(LIST_NAME, domain.domain, { members: [ mailbox , 'outsider@external.com' ], membersOnly: false, active: true }, auditSource);
});
it('get specific list', async function () {
@@ -376,7 +376,7 @@ describe('Ldap Server', function () {
});
it('inactive list', async function () {
await mail.updateList(LIST_NAME, domain.domain, { members: [ mailbox , 'outsider@external.com' ], membersOnly: false, active: false }, auditSource);
await mail.updateMailingList(LIST_NAME, domain.domain, { members: [ mailbox , 'outsider@external.com' ], membersOnly: false, active: false }, auditSource);
const [error] = await safe(ldapSearch('cn=devs@example.com,ou=mailinglists,dc=cloudron', 'objectclass=mailGroup'));
expect(error).to.be.a(ldap.NoSuchObjectError);
});