Cannot share folders with the MDM plugin

Good morning,

I have been trying for a long time to share public folders via the MDM plugin with no success.

Thanks to Manfred, I was able to share them using the z-push command line, but adding them via the plugin front end shows the problems identified in the thread below.

I hope this helps.

Good afternoon, I was wondering if anyone had the chance of looking at this. I can provide more logs or information if necessary.

@mcostan I read through the topic from the link. If I understand correctly adding shared folders works when done through z-push-admin but not when done through the MDM plugin?

Which versions (WebApp, MDM, Z-Push) are you running? When you add a shared folder to your device through the MDM plugin, does it show up in the ‘Additional Folders’ list for that device in z-push-admin?

I just tested with my own device on our production server, and was able to successfully synchronise a folder from another mailbox.



I will come back with the exact versions of all the software tonight, but I believe the MDM version is one of the latest but I can update it if necessary. I believe I updated Webapp from the community repository a couple of days ago.

When I add a folder via the MDM plugin it shows as “shared” in webapp, but in z-push-admin you see it as reported in the other thread, i.e. without the use SYSTEM attached to it.


I tried again, When I do this from the MDM front end I get the following.

The folder on the top “bill” works fine, and it was added using z-push.

The folder “Oracle” was added from the MDM plugin:

        Folder name:    Bills
        Store:          SYSTEM
        Type:           Email
        Origin:         Shared
        Folder id:      9995a8356ba047cd800edeb80b480023384b00000000
        Parent id:      0
        Synched:        Active
        Folder name:    Oracle - 
        Type:           Email
        Origin:         Shared
        Folder id:      9995a8356ba047cd800edeb80b480023e9010b000000
        Parent id:      0

Note the user SYSTEM missing.

the versions are as following:

Kopano Core:

We’ve basically experienced the same problem with public folders.
When adding a folder with the MDM plugin, the store / user SYSTEM is missing.
Works only by adding with z-push.

Tried several versions of MDM plugin, incl. , with several Version of Zarafa / Kopano Core


I just checked my MDM plugin version, it’s the latest on the community site:


I think this bug needs to be fixed though… It is currently very misleading as the MDM front end says “shared” whilst the folders just do not appear.

What’s more it wasn’t easy at all to debug and I had to take the valuable time from @Manfred to work out what was going on…

I think it would be great to get to the bottom of this.

If there is anything else I can do to help with debugging please do let me know.

It is good to know that @tosty is having the same issue as perhaps it will be easier to replicate.

@mcostan / @tosty I added some background to and we’ll check it out soon


Seems, this little change fixes the problem:

--- class.pluginmdmmodule.php.orig      2018-08-05 20:13:22.903000354 +0200
+++ class.pluginmdmmodule.php   2018-08-06 14:18:36.403006245 +0200
@@ -795,7 +795,7 @@
        if ($subfolder[PR_SUBFOLDERS]) {
                if ($specialFolder) {
                        // Special folders can be redirected again to getSubFolders(),
-                       $this->getSubFolders($specialFolder, $store, $properties, $storeData, $subfolder[PR_ENTRYID], $storeUserName);
+                       $this->getSubFolders($specialFolder, $store, $properties, $storeData, $storeUserName);
                } else {
                        $folderObject = mapi_msgstore_openentry($store, $subfolder[PR_ENTRYID]);
                        array_push($expand, array('folder' => $folderObject, 'props' => $subfolder));```


That’s great!


Let us know when this is in the MDM build and I can test and report back if this fixes the issue on my side.

Thanks a lot!

@tosty Cool! If you could create your patch following this guide: we can put it in the code as a contribution.

Well, I tried to get this done yesterday. Sent the patch via email.

@tosty thanks! I found your email and exported a patch - it is attached to the ticket.


Good afternoon, I was wondering when the fix will be available in the overnight community builds.


Good afternoon, I noticed the JIRA is now set to completed. Can I assume that the community overnight builds will include the fix?

Yes and I’ve put them online already

Great thank you for your help. I’ll pick up the changes and test.


Installed and tested and I can confirm that this fixes the bug. Much appreciated in particular to @tosty for finding the solution!

You’re welcome!