Export email accounts

Hi,

I have setup my zimbra mail server with 2 domains. I want to know how to export account details (mail id, first name, last name, display name and if possible password) for all users to csv file using CLI mode.

I also want to know how to get the list of DL accounts and the users list in each DL.

You would have to run the following for each user to get the username (uid) firstname (givenname) lastname (sn) displayName
zmprov ga [accountname] uid givenname sn displayName
You're not going to be able to get the password any way I'm aware of. If Zimbra could do that (which I don't think it can) it would be bad since they are one way hashed.

Listing distribution lists:
zmprov gadl [domain optional]

Listing members of a distribution list
zmprov gdl user@domain zimbraMailForwardingAddress