I can't select more than 91 users

As you want to create an everyone@ email alias as a mail distribution list, avoid creating an LDAP group with many users.

Create the address and select one user as destination. I recommend to set the “Internal” flag under Advanced.

immagine

Then login in as root on the NS8 leader node and run a command like this:

api-cli run cluster/list-domain-users --data '{"domain":"ad.dp.nethserver.net"}' | \
    jq '{"atype":"domain","local":"everyone","domain":"dp.nethserver.net","internal":true,"destinations":[.users[]|select(.user!="Administrator")|{"dtype":"user","name":.user}]}' | \
    api-cli run module/mail1/alter-address --data -

The command is constituted by three parts:

  1. fetches the users list with list-domain-users action
  2. converts its output in the input format expected by alter-address with jq. I excluded the Administrator user from the list, just as an example.
  3. runs alter-address with the input provided by jq output.

It’s important to match local and domain values with your target address entry. You can get a list of defined addresses with:

api-cli run module/mail1/list-addresses | jq

After running the alter-address action with the above filter as input you’d get the everyone address with all your users as destinations.

immagine

This command can run automatically every day. Maybe someone will write an See this Howto for it.

3 Likes