list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
nukeaut
Posts: 15
Joined: Sat Sep 13, 2014 3:09 am

list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0

Postby nukeaut » Thu Nov 12, 2015 10:21 am

hi, I need a list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0, does anybody know how to get this list by an e.g. zmmailbox command? zmmailbox -z -m user1@ehowstuff.local gof does only show me the shared folders which are also added, if I delete one of them I still have the right to add the folder, but it's not shown with the zmmailbox -z -m user1@ehowstuff.local gof command .. do I need to handle this with an ldapsearch command?



User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 608
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.0.9.GA.6191.UBUNTU12.64 FOSS

list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0

Postby ccelis5215 » Thu Nov 12, 2015 11:25 am

Hi nukeaut,

Zimbra uses MariaDB to store this data.


Look at [View:https://wiki.zimbra.com/wiki/Account_mailbox_database_structure:940:0]


and [View:https://wiki.zimbra.com/wiki/Ajcody-Mysql-Topics:940:0] 



ccelis

nukeaut
Posts: 15
Joined: Sat Sep 13, 2014 3:09 am

list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0

Postby nukeaut » Mon Nov 16, 2015 10:15 am

hi ccelis,



I don't find the relevant table for my proposal, do you know where to find the "Folders shared by me" entries in MariaDB?
jerryboi
Advanced member
Advanced member
Posts: 122
Joined: Fri Sep 12, 2014 10:09 pm

list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0

Postby jerryboi » Mon Nov 16, 2015 2:47 pm

You have to issue an zmmailbox gaf (GetAllFolders) and then do a zmmailbox gfg (GetFolderGrants) against this list, and iterate it through all accounts (zmmailbox gas):



#!/bin/bash
clear
echo Getting Folder Share Grants...
for USER in pop3.test@domain.net imap.test@domain.net
do
echo
zmmailbox -z -m $USER gaf > /tmp/shares$$
echo Mailbox folders for $USER
cat /tmp/shares$$
echo ; echo Accepted shared folders from others:
grep : /tmp/shares$$ | cut -c 43-
echo
zmmailbox -z -m $USER gaf | egrep -v ':|Count|----------' | cut -c 43- > /tmp/shares$$
cat /tmp/shares$$ |while read FOLDER
do
echo Grants for $USER: $FOLDER:
zmmailbox -z -m $USER gfg "$FOLDER"
echo
done
echo
done
rm -f /tmp/shares$$
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 608
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.0.9.GA.6191.UBUNTU12.64 FOSS

list of all entries in "Folders shared by me" from all accounts, using zimbra 8.6.0

Postby ccelis5215 » Tue Nov 17, 2015 6:38 am

Hello,



The jerriboi script works, you just have to "clean" the output.



I prefer the query db approach, it's fast.



Look at zimbra.mailbox table and mboxgroup#.mail_item table entries type=13 and metadata fields.



ccelis

Return to “Administrators”

Who is online

Users browsing this forum: MSN [Bot] and 6 guests