[SOLVED] obtain all mail accounts from a user?

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
iibarguren
Posts: 15
Joined: Wed Apr 06, 2016 12:18 pm

[SOLVED] obtain all mail accounts from a user?

Post by iibarguren »

Hi,

Any script or command to obtain all accounts from a user? For example this user has 3 mail accounts

User1:
- Account1: user@domain.com
- Department: department@domain.com
- Account2: temp@domain.com


How can I obtain this three mail addresses?

thanks in advance
Last edited by iibarguren on Tue Feb 21, 2017 7:04 am, edited 1 time in total.
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: obtain all mail accounts from a user?

Post by phoenix »

You can get that by using zmprov (full details in the wiki and the zmprov help command) and I believe there's a post in the forums on how to do that if you wanted ti list more than one user.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
iibarguren
Posts: 15
Joined: Wed Apr 06, 2016 12:18 pm

Re: obtain all mail accounts from a user?

Post by iibarguren »

I'm searching but I don't find anything related
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Re: obtain all mail accounts from a user?

Post by jorgedlcruz »

Hello,
Maybe this?

Code: Select all

zmprov gid user@domain.com
Best regards
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
iibarguren
Posts: 15
Joined: Wed Apr 06, 2016 12:18 pm

Re: obtain all mail accounts from a user?

Post by iibarguren »

jorgedlcruz wrote:Hello,
Maybe this?

Code: Select all

zmprov gid user@domain.com
Best regards
thanks for your reply but this is not what I want... there is no account info there...


In the example above, when the User1 logons to zimbra have 3 accounts on Preferences => Accounts:
- Himself ( user1@domain )
- deparment account ( department@domain )
- another users account, a colegue in holidays for example ( temp@domain )


What I need is to get all accounts that have a user, in this case user1@domain, department@domain and temp@domain.

I need them because in another script we are going to generate diferent signatures for each of them.
iibarguren
Posts: 15
Joined: Wed Apr 06, 2016 12:18 pm

[SOLVED] Re: obtain all mail accounts from a user?

Post by iibarguren »

I found the solution. I was always looking for "mail", "external mail" .... when I have to seek for "Datasource". The solution is this:

Code: Select all

zmprov gds myuser | grep zimbraDataSourceEmailAddre
Post Reply