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

    Import Contacts to ldap using kopano schema

    General Discussion
    3
    5
    878
    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.
    • genz
      genz last edited by genz

      Hey Guys,

      I was wondering if there is a way to import contacts from another ldap server.

      As far as I know when you want to add a contact in kopano you need to add the record to the kopano-ldap and the dn should have the following root: ou=Contacts,dc=cern,dc=ch.
      The example you provide in the documentation is the one about Mary Poppins:

      # Mary Poppins, Contacts, cern.ch
      dn: cn=Mary Poppins,ou=Contacts,dc=cern,dc=ch
      objectClass: inetOrgPerson
      objectClass: top
      objectClass: kopano-contact
      uidNumber: 1001
      sn: Poppins
      cn: Mary Poppins
      mail: mary@cern.ch
      

      Now I have some contacts stored in another ldap server that I would like to add to the kopano-ldap.
      The only idea that I had is create an ldif file with the contacts that I want to import and add them to the kopano-ldap.

      Is there a way to simplify this procedure and import contacts from another ldap server even though they are implementing a different schema?

      Is there any workaround that I can use to do that?

      Thanks in advance

      Riccardo

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

        Hi @genz ,

        kopano-server is only able to query one ldap server at a time, so when managing contacts in an ldap you have to make sure that this ldap also contains your users.

        as for

        @genz said in Import Contacts to ldap using kopano schema:

        even though they are implementing a different schema?

        you can quite freely configure the ldap attributes and object classes used by kopano, so it might be worth adapting your ldap.cfg to fit these external contacts.

        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
        • genz
          genz last edited by

          Hey Guys,
          I converted my contacts records and I added them to the OpenLDAP connected to the kopano-server.
          Everything seems to work but when I search in the address book every search is very slow and if I do not type some characters I receive an error like this one: HTTP 500 Internal Server Error

          I added 50’000 ish records and in the OpenLDAP I have defined the indexes for cn,sn and mail attributes with the clauses eq ,sub and pres.

          I pretty sure that I am missing something here. But I am not able to understand what.
          From the logs, every time I do a query using the web app it seems that kopano first does this:

          my-host: SRCH base="dc=cern,dc=ch" scope=2 deref=0 filter="(|(|(objectClass=posixAccount)(objectClass=kopano-contact))(objectClass=kopano-contact)(|(objectClass=posixGroup)(objectClass=kopano-dynamicgroup))
          my-host: SRCH attr=objectClass kopanoSharedStoreOnly kopanoResourceType kopanoSecurityGroup uidNumber gidNumber ou cn cn modifyTimestamp
          my-host: SEARCH RESULT tag=101 err=0 nentries=1000 text=
          my-host: SRCH base="dc=cern,dc=ch" scope=2 deref=0 filter="(|(|(objectClass=posixAccount)(objectClass=kopano-contact))(objectClass=kopano-contact)(|(objectClass=posixGroup)(objectClass=kopano-dynamicgroup))
          my-host: SRCH attr=objectClass kopanoSharedStoreOnly kopanoResourceType kopanoSecurityGroup uidNumber gidNumber ou cn cn modifyTimestamp
          my-host: SEARCH RESULT tag=101 err=0 nentries=1000 text=
          my-host: SRCH base="dc=cern,dc=ch" scope=2 deref=0 filter="(|(|(objectClass=posixAccount)(objectClass=kopano-contact))(objectClass=kopano-contact)(|(objectClass=posixGroup)(objectClass=kopano-dynamicgroup))
          my-host: SRCH attr=objectClass kopanoSharedStoreOnly kopanoResourceType kopanoSecurityGroup uidNumber gidNumber ou cn cn modifyTimestamp
          my-host: SEARCH RESULT tag=101 err=0 nentries=1000 text=
          [...]
          

          and after it starts to search record using the UIDs:

          my-host: SRCH base="dc=cern,dc=ch" scope=2 deref=0 filter="(|(&(objectClass=kopano-contact)(|(uidNumber=29815))))"
          my-host: SRCH attr=objectClass uidNumber text cn uid userPassword mail kopanoAliases kopanoAdmin kopanoSharedStoreOnly kopanoResourceType kopanoResourceCapacity userCertificate;binary kopanoSendAsPrivilege 
          my-host: SEARCH RESULT tag=101 err=0 nentries=0 text=
          my-host: SRCH base="dc=cern,dc=ch" scope=2 deref=0 filter="(|(&(objectClass=kopano-contact)(|(uidNumber=29816))))"
          my-host: SRCH attr=objectClass uidNumber text cn uid userPassword mail kopanoAliases kopanoAdmin kopanoSharedStoreOnly kopanoResourceType kopanoResourceCapacity userCertificate;binary kopanoSendAsPrivilege 
          my-host: SEARCH RESULT tag=101 err=0 nentries=0 text=
          my-host: SRCH base="dc=cern,dc=ch" scope=2 deref=0 filter="(|(&(objectClass=kopano-contact)(|(uidNumber=29817))))"
          my-host: SRCH attr=objectClass uidNumber text cn uid userPassword mail kopanoAliases kopanoAdmin kopanoSharedStoreOnly kopanoResourceType kopanoResourceCapacity userCertificate;binary kopanoSendAsPrivilege 
          my-host: SEARCH RESULT tag=101 err=0 nentries=0 text=
          

          No matter which word I type the behaviour it’s always the same.

          Thanks,
          Riccardo

          1 Reply Last reply Reply Quote 0
          • jengelh
            jengelh Banned last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • genz
              genz last edited by

              I found a solution:

              I had to add this in the /etc/kopano/server.cfg in order to avoid the full sync for every query.

              sync_gab_realtime = no
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post