gab2contacts with univention not syncing LDAP Kopano contacts
-
Hi Manfred,
Yes, I ment the KOE.
Thx for the hint with the button in the WebApp, I never pressed it :-)I tried some times again with new LDAP contacts. They are created only once in the GAB but everytime the sync script runs in the contacts.
root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 6 - in folder (before run): 5 - created: 0 - updated: 0 - deleted: 0 - untouched: 5 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 5 - created: 3 - updated: 0 - deleted: 0 - untouched: 5 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1
The content of /etc/kopano/userscripts/createuser.d/01updatecontacts is taken from the gab2contacts tutorial and is following
#!/bin/sh set -e GABCONTACTS=/usr/share/z-push/tools/gab2contacts/gab2contacts.php if [ -e $GABCONTACTS ]; then $GABCONTACTS -a sync fi
Best regards!
Andy
-
Hi Andy,
that’s weird. As you can see the from the script output, it looks like that some contacts are missing (9 in GAB and 6 in the folder, from the missing 3 contacts 2 are created and 1 ignored). Are display_errors and error_reporting enabled in php.ini? Are there any errors when you run the script?
Which KC and php-mapi versions are you using?
The only thing I could think of is that there’s some strange caching issue on your server.
Manfred
-
Hi Manfred,
I am running KC 8.4.5.0 on UCS 4.3-0 errata12, Z-Push is 2.3.8+0, MAPI Support 8.4.5.0. I can’t say if there’s any strange caching, because I didn’t do any modifications on that UCS. display_errors is actually disabled and error_reporting shows 22527.
I think I could figure out the source of this in this moment. gab2contacts I tried was 2.4.1 installed in an old folder /usr/share/z-push which looks like that it is no longer used by Kopano4UCS Z-Push.
Is there a way to install gab2contacts on UCS 4.3 with KC 8.4.5 and z-push 2.3.8?
Thx!
Andy
-
Hi Andy,
I don’t know if UCS does it differently, but /usr/share/z-push is the default Z-Push installation location for quite some time already.
If gab2contacts is not in tools folder of your z-push installation, you can download the z-push-2.3.8.tar.gz file and extract gab2contacts from it.
Manfred
-
@raceface2nd said in gab2contacts with univention not syncing LDAP Kopano contacts:
/usr/share/z-push which looks like that it is no longer used by Kopano4UCS Z-Push.
This is the default install directory and should be used in any case.
To install gab2contacts you just need to install the package for it. i.e. ´univention-install z-push-kopano-gab2contacts´.
ps: if you want to have the most recent Z-Push version its recommended to configure the Y-Push repo inside of the app. read https://wiki.z-hub.io/display/K4U/Updating+Kopano+packages+directly+from+the+Kopano+download+server for more instructions.
-
So, I uninstalled gab2contacts 2.4.1, downloaded 2.3.8, configured it and performed the modifications from https://stash.z-hub.io/projects/ZP/repos/z-push/pull-requests/691/diff.
The issue is still the same.
Tonight I will try upgrading all z-push components to 2.4 in the hope it will work then.
Andy
-
Tonight I upgraded to z-push 2.4.1+0 but the problem still exists.
root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 8 - in folder (before run): 5 - created: 2 - updated: 0 - deleted: 0 - untouched: 5 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 8 - in folder (before run): 6 - created: 1 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 8 - in folder (before run): 6 - created: 1 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Sync - Objects in GAB: 8 - in folder (before run): 6 - created: 1 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1 ii kopano4ucs-z-push 1.3.26 all Meta package for Z-Push installation ii z-push-autodiscover 2.3.8+0-0 all Z-Push autodiscover ii z-push-backend-kopano 2.4.1+0-0 all Z-Push Kopano backend ii z-push-common 2.4.1+0-0 all open source implementation of the ActiveSync protocol ii z-push-config-apache 2.3.8+0-0 all Z-Push apache configuration ii z-push-config-apache-autodiscover 2.3.8+0-0 all Z-Push autodiscover apache configuration ii z-push-ipc-sharedmemory 2.4.1+0-0 all Z-Push ipc shared memory provider ii z-push-kopano 2.4.1+0-0 all Z-Push for Kopano ii z-push-kopano-gab2contacts 2.4.1+0-0 all GAB sync into a contacts folder for Kopano ii z-push-kopano-gabsync 2.4.1+0-0 all GAB sync for Kopano
It’s a kind of weird.
Maybe you have some ideas what it could be?
Regards!
Andy
-
Hi Andy,
did you apply fixes from https://jira.z-hub.io/browse/ZP-1401 after updating to Z-Push 2.4.1?
Could you add this line in gab2contacts/lib/kopano.php right after or before $created++; (it should be around line 260):
print_r($entry);
Manfred
-
Hi Manfred,
yes I applied the fix before. Please find below the output of 2 runs directly after another:
root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a syncArray ( [268370178] => ▒!▒P@▒▒H▒▒S0D%NjBkNjEyZjgtZGI3My0xMDM3LTgwYWEtOTNjZTFmZjUxNzI0 [973078558] => [973471754] => -2147221233 [974192670] => neuer1 [974716938] => -2147221233 [974520330] => -2147221233 [974585866] => -2147221233 [972947486] => [973602826] => -2147221233 [975372298] => -2147221233 [974454794] => -2147221233 [975831050] => -2147221233 [975699978] => -2147221233 [975634442] => -2147221233 [974913546] => -2147221233 [973668362] => -2147221233 [975241226] => -2147221233 [-1935802358] => -2147221233 [974127114] => -2147221233 [956628995] => 6 [805371934] => [1738997770] => -2147221233 ) Array ( [268370178] => ▒!▒P@▒▒H▒▒S0D%NjQ1N2ZkZWMtZGI3My0xMDM3LTgwYWItOTNjZTFmZjUxNzI0 [973078558] => [973471754] => -2147221233 [974192670] => neuer2 [974716938] => -2147221233 [974520330] => -2147221233 [974585866] => -2147221233 [972947486] => [973602826] => -2147221233 [975372298] => -2147221233 [974454794] => -2147221233 [975831050] => -2147221233 [975699978] => -2147221233 [975634442] => -2147221233 [974913546] => -2147221233 [973668362] => -2147221233 [975241226] => -2147221233 [-1935802358] => -2147221233 [974127114] => -2147221233 [956628995] => 6 [805371934] => [1738997770] => -2147221233 ) Sync - Objects in GAB: 8 - in folder (before run): 5 - created: 2 - updated: 0 - deleted: 0 - untouched: 5 - ignored: 1 root@mail2:/usr/share/z-push/tools/gab2contacts# ./gab2contacts.php -a sync Array ( [268370178] => ▒!▒P@▒▒H▒▒S0D%NjQ1N2ZkZWMtZGI3My0xMDM3LTgwYWItOTNjZTFmZjUxNzI0 [973078558] => [973471754] => -2147221233 [974192670] => neuer2 [974716938] => -2147221233 [974520330] => -2147221233 [974585866] => -2147221233 [972947486] => [973602826] => -2147221233 [975372298] => -2147221233 [974454794] => -2147221233 [975831050] => -2147221233 [975699978] => -2147221233 [975634442] => -2147221233 [974913546] => -2147221233 [973668362] => -2147221233 [975241226] => -2147221233 [-1935802358] => -2147221233 [974127114] => -2147221233 [956628995] => 6 [805371934] => [1738997770] => -2147221233 ) Sync - Objects in GAB: 8 - in folder (before run): 6 - created: 1 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1
Andy
-
Hi Andy,
when you’re creating a contact, aren’t you required to also enter username, not only last name? I have no idea how it works in the UCS, in the LDAP on my test system kopano-contacts do have this attribute.
Manfred
-
Hi Manfred, there are 2 types of GAB contacts. 1st are users that require a username and a primary email address and additional 2nd there is an extra option provided by Kopano4UCS where you can add contacts to the GAB like business contacts where only the last name is required. This option can be found under the main option domain in UCS. Users are synched without any issues. The problem is with contacts.
Andy
-
Hi Andy,
it’s a problem that the contacts don’t have a separate username, only the last name. The script uses the username field to check if this entry was already synced. The easiest workaround would be if you would add a unique value as a username for the contacts as well.
Manfred
-
Hi Manfred,
that explains why the sync is not working. Unfortunately there is no option in the Kopano4UCS LDAP contacts to enter a user name. The only option is a displayname which does not seem to be the same like the username.
It looks like that this displayname is stored in a different way in the LDAP by Kopano4UCS so it is not synched into the GAB. Maybe @fbartels knows more about the workflow behind the sync of these contacts into the GAB?
The Kopano4UCS LDAP contacts are stored in the LDAP scheme like in following screenshot.
Regards!
Andy
-
Hi Andy,
what values are in the objectClass property of a contact?
Manfred
-
Hi Manfred,
please find a screenshot with the expanded objectClass below:
Andy
-
Hi Andy,
I’ve created a new kopano-contact in my LDAP using just person, inetOrgPerson, top and kopano-contact classes, but it still got the accountname field set. I’m out of ideas now, so I guess we’ll have to wait if Felix has any idea (he’s currently out of the office until mid of next week) what’s different in the UCS’ LDAP.
Manfred
-
Hi Manfred,
Okay, let’s wait then.
Andy
-
I just did a quick check on my univention system and I don’t see the duplication of objects when running gab2contacts again.
My contact looks as followed:
dn: cn=First Last,cn=contacts,cn=kopano,dc=univention,dc=de kopanoAccount: 1 cn: First Last objectClass: person objectClass: inetOrgPerson objectClass: kopano-contact objectClass: kopano4ucsObject objectClass: top objectClass: univentionObject univentionObjectType: kopano/contact kopanoHidden: 0 univentionObjectFlag: functional sn: Last givenName: First mailPrimaryAddress: mail@test.com
-
Sorry for the radio silence have been busy out of office.
@fbartels : that’s kind of weird.Is it correct, that there is no display name of the Kopano LDAP contacts displayed in the GAB?
I recognized that I only have this behaviour of doubled entries when I create 2 or more LDAP entries at a time and run gab2contacts afterwards. When I only create 1 entry gab2contacts works like a charm with the mod from Manfred.
Andy
-
I do have a display name configured on my system:
But cn is actual the default value for the display name (as given in /usr/share/kopano/ldap.openldap.cfg), so I’m wondering why its empty for you.