Hi,
I have 200+ email addresses in a domain. I want to add that specific domain's email addresses to a Distribution list. Can anyone please suggest how can I do that simply without adding one by one in the GUI?
For the record, I have 5 domains added to my Carbonio CE, but i need to add only one domain's emails to a DL not all domain's emails. Hope this is more specific.
@omiazad
Hi,
You can simply do this:
let's say, your domain is example.com and you have a distribution list dl_support@example.com
$ for i in $(carbonio prov -l gaa example.com); do carbonio prov adlm dl_support@example.com $i; echo $i added to the dl_support@oldserver.xyz; done
As it includes everything including the system addresses (spam, ham, virus, galsync, etc.) into the distribution list, you may need to manually remove them from the distribution list to avoid inconveniences.
Sample output would be:
zextras@mail:~$ for i in $(carbonio prov -l gaa oldserver.xyz); do carbonio prov adlm dl_support@oldserver.xyz $i; echo $i added to Distribution List dl_support@oldserver.xyz; done zextras@oldserver.xyz added to Distribution List dl_support@oldserver.xyz spam.suarp8pz0@oldserver.xyz added to Distribution List dl_support@oldserver.xyz ham.94bki7e40@oldserver.xyz added to Distribution List dl_support@oldserver.xyz virus-quarantine.qfqs7tau@oldserver.xyz added to Distribution List dl_support@oldserver.xyz galsync.ko4i_29rl@oldserver.xyz added to Distribution List dl_support@oldserver.xyz arman@oldserver.xyz added to Distribution List dl_support@oldserver.xyz sharif@oldserver.xyz added to Distribution List dl_support@oldserver.xyz flaminia@oldserver.xyz added to Distribution List dl_support@oldserver.xyz irene@oldserver.xyz added to Distribution List dl_support@oldserver.xyz suman@oldserver.xyz added to Distribution List dl_support@oldserver.xyz zextras@mail:~$
Hope it helps.
Regards,
Sharif
Many thanks for your kind help. 🙏
You made small mistake with the domain name in echo section. But I got it. 🙂