Page 1 of 1

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

Posted: Thu Nov 12, 2015 10:21 am
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?

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

Posted: Thu Nov 12, 2015 11:25 am
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

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

Posted: Mon Nov 16, 2015 10:15 am
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?

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

Posted: Mon Nov 16, 2015 2:47 pm
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$$

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

Posted: Tue Nov 17, 2015 6:38 am
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