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.
![]()
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:
- fetches the users list with
list-domain-usersaction - converts its output in the input format expected by
alter-addresswithjq. I excluded the Administrator user from the list, just as an example. - runs
alter-addresswith the input provided byjqoutput.
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.
![]()
This command can run automatically every day. Maybe someone will write an See this Howto for it.