Here is a simple Ldap query to get this.

$ ldapsearch -LLL -x -D "`zmlocalconfig -m nokey -s zimbra_ldap_userdn`" -w
"`zmlocalconfig -m nokey -s zimbra_ldap_password`" -H "`zmlocalconfig -m nokey
-s ldap_master_url`" -b '' '( & (objectClass=zimbraAccount)
(!(zimbraIsSystemResource=TRUE))
(!(&(zimbraArchiveEnabled=TRUE)(zimbraArchiveAccou nt=*))) )'
zimbraMailDeliveryAddress



Hope this helps.

Cheers,
Raun