I need a list of all accounts and aliases for a script I am writing. I have a one-liner that looks like it will deliver the goods but it is incredibly slow (one hour and counting)...
Code:
for i in `zmprov -l gaa`; do echo "$i"; zmprov -l ga $i | grep -i "MailAlias" | sed 's/zimbraMailAlias\: //gi'; done | sort | uniq
When I use the admin web interface I can see lists of accounts and aliases almost instantly. So how does the admin interface do it? I would like to get these lists from the command line at a similar speed. Is this possible?