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.
Post Reply
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

Post by nukeaut »

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: 632
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

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

Post by ccelis5215 »

Hi nukeaut,

Zimbra uses MariaDB to store this data.
Look at [View:https://wiki.zimbra.com/wiki/Account_ma ... ture: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

Post by nukeaut »

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: 125
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

Post by jerryboi »

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: 632
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

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

Post by ccelis5215 »

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
Post Reply