zmprov displays incorrect data

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
Mr.Twister
Posts: 10
Joined: Sat Sep 13, 2014 2:55 am
Location: Moskow, Russia
ZCS/ZD Version: 8.7.11_GA_1854

zmprov displays incorrect data

Post by Mr.Twister »

Hello!

We use "Zimbra 8.7.11_GA_1854 (ZimbraWebClient - GC63 (Win)/8.7.11_GA_1854)"
I'm trying to write report about sharing - who share folders and who have rights to use this shares.

zmmailbox can show folder Ids.
zmprov can show who have rights to use it.

But! If folder ID is longer than 5 digits in length (ID is bigger than 100000) zmprov cuts last digit.

You can see it on this example:
4 folders have ID longer than 5 digits.

Code: Select all

[root@mail zim-scripts]# /opt/zimbra/bin/zmmailbox -z -m serviceacct@my-domain.ru getAllFolders
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
       257  unkn           0           0  /Comments
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0          36  /Emailed Contacts
         2  mess           5       11180  /Inbox
    181265  mess          21       38426  /Inbox/__personal
    181266  mess           0        1755  /Inbox/__personal/ПП - на оплату
         4  mess           2           2  /Junk
         5  mess           0         538  /Sent
    181267  mess          16        5849  /Sent/__personal
        15  task           0           0  /Tasks
         3  unkn           0         180  /Trash
    245729  unkn           0           0  /Trash/Trash
3 of it is shared.
And zmprov shows only 5 digits of ID:

Code: Select all

[root@mail zim-scripts]# /opt/zimbra/bin/zmprov getShareInfo serviceacct@my-domain.ru
owner id                             owner email     owner display   id    path                 view       type       rights     mid   gt    grantee id                           grantee name    grantee display
------------------------------------ --------------- --------------- ----- -------------------- ---------- ---------- ---------- ----- ----- ------------------------------------ --------------- ---------------
...
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            2     /Inbox               message    UNKNOWN    rwidx            usr   9970eg96-a158-4703-8a8a-055f3564c716 zin2@my-domain.ru Service User 1
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            2     /Inbox               message    UNKNOWN    rwidx            usr   743b7c3b-48c4-4b86-8dbc-c62ahf044f80 zoa2@my-domain.ru Service User 2
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal    message    UNKNOWN    rwidx            usr   5de09768-fhc8-4283-bcab-1b2b76a6e09b amm@my-domain.ru  Service User 3
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal    message    UNKNOWN    rwidx            usr   ce6f5822-930c-4658-86fh-99605130d13f aov@my-domain.ru  Service User 4
...
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal    message    UNKNOWN    rwidx            usr   9970eg96-a158-4703-8a8a-055f3564c716 zin2@my-domain.ru Service User 1
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal    message    UNKNOWN    rwidx            usr   743b7c3b-48c4-4b86-8dbc-c62ahf044f80 zoa2@my-domain.ru Service User 2
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal/ПП message    UNKNOWN    rwidx            usr   5de09768-fhc8-4283-bcab-1b2b76a6e09b amm@my-domain.ru  Service User 3
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal/ПП message    UNKNOWN    rwidx            usr   ce6f5822-930c-4658-86fh-99605130d13f aov@my-domain.ru  Service User 4
...
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal/ПП message    UNKNOWN    rwidx            usr   9970eg96-a158-4703-8a8a-055f3564c716 zin2@my-domain.ru Service User 1
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Inbox/__personal/ПП message    UNKNOWN    rwidx            usr   743b7c3b-48c4-4b86-8dbc-c62ahf044f80 zoa2@my-domain.ru Service User 2
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            4     /Junk                message    UNKNOWN    rwidx            usr   5de09768-fhc8-4283-bcab-1b2b76a6e09b amm@my-domain.ru  Service User 3
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            4     /Junk                message    UNKNOWN    rwidx            usr   ce6f5822-930c-4658-86fh-99605130d13f aov@my-domain.ru  Service User 4
...
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            5     /Sent                message    UNKNOWN    rwidx            usr   9970eg96-a158-4703-8a8a-055f3564c716 zin2@my-domain.ru Service User 1
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            5     /Sent                message    UNKNOWN    rwidx            usr   743b7c3b-48c4-4b86-8dbc-c62ahf044f80 zoa2@my-domain.ru Service User 2
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Sent/__personal     message    UNKNOWN    rwidx            usr   5de09768-fhc8-4283-bcab-1b2b76a6e09b amm@my-domain.ru  Service User 3
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Sent/__personal     message    UNKNOWN    rwidx            usr   ce6f5822-930c-4658-86fh-99605130d13f aov@my-domain.ru  Service User 4
...
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Sent/__personal     message    UNKNOWN    rwidx            usr   9970eg96-a158-4703-8a8a-055f3564c716 zin2@my-domain.ru Service User 1
c497d04f-3986-456d-afbc-789d7gd68jb6 serviceacct@my- null            18126 /Sent/__personal     message    UNKNOWN    rwidx            usr   743b7c3b-48c4-4b86-8dbc-c62ahf044f80 zoa2@my-domain.ru Service User 2
zmprov cuts everything - folder names, folder IDs
So it is useless.

Is it a bug?
How can I get full data?
Mr.Twister
Posts: 10
Joined: Sat Sep 13, 2014 2:55 am
Location: Moskow, Russia
ZCS/ZD Version: 8.7.11_GA_1854

Re: zmprov displays incorrect data

Post by Mr.Twister »

Do not use "zmprov getShareInfo <account>"
Use "zmprov getAccount <account> zimbraSharedItem"
Post Reply