I can't take credit for this command. I found it somewhere when we needed to find which users were on which mailbox servers last week.
Original command:
Code:
zmprov gaa -v | grep -e zimbraMailDeliveryAddress: -e zimbraMailHost | grep -B1 SERVERNAME | grep zimbraMailDeliveryAddress: | awk '{print $2}' Replace SERVERNAME with your host name.
Some modifications yield:
Code:
zmprov gaa -v | grep -e zimbraMailDeliveryAddress: -e zimbraMailForwardingAddress:
This should get you a list of all e-mail address on the system, and if they have a forwarding e-mail address in, it will appear right under it.
Example:
Code:
zimbraMailDeliveryAddress: user1@domain.com
zimbraMailForwardingAddress: forward1@domain2.com
zimbraMailForwardingAddress: forward2@domain2.com
zimbraMailDeliveryAddress: user2domain.com
Now, some awk / regex expert can probably clean this up.
Cheers!
Dusty