Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    gab2contacts with univention not syncing LDAP Kopano contacts

    Z-Push when using Kopano
    3
    33
    3654
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Manfred
      Manfred Kopano @raceface2nd last edited by

      Hi Andy,

      @raceface2nd said in gab2contacts with univention not syncing LDAP Kopano contacts:

      Hi Felix,
      Hi Manfred,

      It is correct, that the contacts I add in univention are written into the GAB. But without the fix these contacts have been ignored. A question beside . . . How can I view the GAB in the WebApp and/ or in Outlook without the OLE?

      What do you mean by OLE? KOE?
      In the Webapp there’s “Address book” button (2nd from left) which opens the GAB.
      Outlook with ActiveSync requires KOE and gab-sync in order GAB to be available.

      @raceface2nd said in gab2contacts with univention not syncing LDAP Kopano contacts:

      @Manfred : With your fix the contacts are added to the contacts but unfortunately n-1 contacts are added every time the script runs. When I delete a contact it is not deleted while the sync runs.

      root@mail2:~# /etc/kopano/userscripts/createuser.d/01updatecontacts
      Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1
      
      root@mail2:~# /etc/kopano/userscripts/createuser.d/01updatecontacts
      Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1
      
      root@mail2:~# /etc/kopano/userscripts/createuser.d/01updatecontacts
      Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1
      

      I’m not able to reproduce that. If there were no changes in GAB, the script doesn’t add anything:

      root@ubuntu:/z-push/tools/gab2contacts# ./gab2contacts.php -a sync
      Sync - Objects in GAB: 32 - in folder (before run): 27 - created: 0 - updated: 0 - deleted: 0 - untouched: 27 - ignored: 5
      
      root@ubuntu:/z-push/tools/gab2contacts# ./gab2contacts.php -a sync
      Sync - Objects in GAB: 32 - in folder (before run): 27 - created: 0 - updated: 0 - deleted: 0 - untouched: 27 - ignored: 5
      
      

      @raceface2nd said in gab2contacts with univention not syncing LDAP Kopano contacts:

      Deletion also seems to work only for 1 contact at a time. After the above creation I deleted 3 contacts at a time but only one contact has been deleted, I had to run the script several times to delete all contacts that have been created with this script.

      root@mail2:~# /etc/kopano/userscripts/createuser.d/01updatecontacts
      Sync - Objects in GAB: 9 - in folder (before run): 6 - created: 2 - updated: 0 - deleted: 0 - untouched: 6 - ignored: 1
      
      root@mail2:~# /etc/kopano/userscripts/createuser.d/01updatecontacts
      Sync - Objects in GAB: 6 - in folder (before run): 6 - created: 0 - updated: 0 - deleted: 1 - untouched: 5 - ignored: 1
      

      I was also not able to reproduce that. I deleted two contacts and ran the script:

      root@ubuntu:/z-push/tools/gab2contacts# ./gab2contacts.php -a sync
      Sync - Objects in GAB: 30 - in folder (before run): 27 - created: 0 - updated: 0 - deleted: 2 - untouched: 25 - ignored: 5
      
      

      What are the contents of /etc/kopano/userscripts/createuser.d/01updatecontacts and what calls it?

      Manfred

      1 Reply Last reply Reply Quote 0
      • raceface2nd
        raceface2nd last edited by

        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.

        0_1524155905768_25a40aa2-18e0-4e23-a027-9af57f5bc108-grafik.png

        0_1524155691232_564f2e48-0e62-4126-9762-db1db38e04bd-grafik.png

        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

        1 Reply Last reply Reply Quote 0
        • Manfred
          Manfred Kopano last edited by

          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

          1 Reply Last reply Reply Quote 0
          • raceface2nd
            raceface2nd last edited by

            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

            1 Reply Last reply Reply Quote 0
            • Manfred
              Manfred Kopano last edited by

              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

              1 Reply Last reply Reply Quote 0
              • fbartels
                fbartels Kopano last edited by

                @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.

                Regards Felix

                Resources:
                https://kopano.com/blog/how-to-get-kopano/
                https://documentation.kopano.io/
                https://kb.kopano.io/

                Support overview:
                https://kopano.com/support/

                1 Reply Last reply Reply Quote 0
                • raceface2nd
                  raceface2nd last edited by

                  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.

                  0_1524488809370_c5168d04-04bb-4eba-800f-82e63d1107a1-grafik.png

                  0_1524488837748_4194e167-51c8-443a-8fa9-4e7b25e46c2f-grafik.png

                  Tonight I will try upgrading all z-push components to 2.4 in the hope it will work then.

                  Andy

                  1 Reply Last reply Reply Quote 0
                  • raceface2nd
                    raceface2nd last edited by

                    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

                    1 Reply Last reply Reply Quote 0
                    • Manfred
                      Manfred Kopano last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • raceface2nd
                        raceface2nd last edited by

                        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 sync

                        Array
                        (
                            [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

                        1 Reply Last reply Reply Quote 0
                        • Manfred
                          Manfred Kopano last edited by

                          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

                          1 Reply Last reply Reply Quote 0
                          • raceface2nd
                            raceface2nd last edited by

                            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

                            1 Reply Last reply Reply Quote 0
                            • Manfred
                              Manfred Kopano last edited by

                              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

                              1 Reply Last reply Reply Quote 0
                              • raceface2nd
                                raceface2nd last edited by raceface2nd

                                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.

                                0_1524664079035_428651c8-7a09-4d4f-9c8c-963e1401a7ac-image.png

                                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.
                                0_1524664564092_1190d032-69ef-4de9-8f80-ade77d9268db-image.png

                                Regards!

                                Andy

                                1 Reply Last reply Reply Quote 0
                                • Manfred
                                  Manfred Kopano last edited by

                                  Hi Andy,

                                  what values are in the objectClass property of a contact?

                                  Manfred

                                  1 Reply Last reply Reply Quote 0
                                  • raceface2nd
                                    raceface2nd last edited by

                                    Hi Manfred,

                                    please find a screenshot with the expanded objectClass below:

                                    0_1524691438996_4c5983cf-7d88-4629-9377-fd497394a5cb-image.png

                                    Andy

                                    1 Reply Last reply Reply Quote 0
                                    • Manfred
                                      Manfred Kopano last edited by

                                      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

                                      1 Reply Last reply Reply Quote 0
                                      • raceface2nd
                                        raceface2nd last edited by

                                        Hi Manfred,

                                        Okay, let’s wait then.

                                        Andy

                                        1 Reply Last reply Reply Quote 0
                                        • fbartels
                                          fbartels Kopano last edited by

                                          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
                                          

                                          Regards Felix

                                          Resources:
                                          https://kopano.com/blog/how-to-get-kopano/
                                          https://documentation.kopano.io/
                                          https://kb.kopano.io/

                                          Support overview:
                                          https://kopano.com/support/

                                          1 Reply Last reply Reply Quote 0
                                          • raceface2nd
                                            raceface2nd last edited by

                                            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?

                                            0_1526294975336_e1a3cd52-e0a7-4142-8be2-fbda422b9a1d-grafik.png

                                            0_1526295010074_fa7a6e41-5771-498b-bdb6-1075dbd9cce5-grafik.png

                                            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

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post