mail: allow aliases to have wildcard
this came out of https://forum.cloudron.io/topic/6350/disposable-email-prefixes-for-existing-mailboxes/
This commit is contained in:
@@ -183,6 +183,19 @@ describe('Mail', function () {
|
||||
expect(results[1].domain).to.be(domain.domain);
|
||||
});
|
||||
|
||||
it('can set wildcard alias', async function () {
|
||||
await mail.setAliases('support', domain.domain, [ { name: 'support*', domain: domain.domain }, { name: 'help', domain: domain.domain } ], auditSource);
|
||||
});
|
||||
|
||||
it('can get aliases of name', async function () {
|
||||
const results = await mail.getAliases('support', domain.domain);
|
||||
expect(results.length).to.be(2);
|
||||
expect(results[0].name).to.be('help');
|
||||
expect(results[0].domain).to.be(domain.domain);
|
||||
expect(results[1].name).to.be('support*');
|
||||
expect(results[1].domain).to.be(domain.domain);
|
||||
});
|
||||
|
||||
it('unset aliases', async function () {
|
||||
await mail.setAliases('support', domain.domain, [], auditSource);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user