linagora / james-project

Mirror of Apache James Project
Apache License 2.0
72 stars 62 forks source link

[MU] Mailet to mail to all users #5307

Closed chibenwa closed 3 weeks ago

chibenwa commented 1 month ago

Why?

One customer want a mail alias for writing to everybody hosted on the platform (information on the mail service)

Example...

<mailet matcher="RecipientIs=all@govmu.org" class="MailToAllUsers" >
    <batchSize>100</batchSize>
</mailet>

Will replace existing recipients with all users (usersrepositroy.listUsers) as recipient of the email.

This can be contributed into server-mailets

Performance notes

Note that this can cause significant processing as APPENDING emails for one recipient can be a longish operation. Adding a batchSize parameter can be a good idea:

quantranhong1999 commented 4 weeks ago

https://github.com/apache/james-project/pull/2469

Arsnael commented 3 weeks ago

Can't just be a group ML with all users part of it? Or they just don't want to bother maintaining such a group list?