Menu

iCal LDAP integration

Help
Shocker
2009-03-06
2013-06-12
  • Shocker

    Shocker - 2009-03-06

    I know this was discussed in another thread, but I can't find it anymore.

    Mickaël,
    Since you have done such an awesome job getting iCal calendar functioning, what info do you need to help get the LDAP stuff working in iCal... I'm hoping this might allow for free/busy time/availability lookups when creating an invite.

    Thanks.

     
    • DMF

      DMF - 2009-03-06

      iCal free/busy is already working (doesn't need LDAP - it just depends on the email addresses of users).  For iCal autocomplete,  I passed on some changes to Mickael that make it work - though it's still a bit tricky to configure to get working correctly.

       
    • Shocker

      Shocker - 2009-03-06

      Can you share the details?

      Thanks

       
      • Mickael Guessant

        Created a new RFE to track this:
        https://sourceforge.net/tracker2/?func=detail&aid=2675510&group_id=184600&atid=909907

        You will find the current code in attached file.

         
        • DMF

          DMF - 2009-03-12

          FYI, I added the setup directions for setting up the directory to work with iCal (using the code attached to the RFE).

          https://sourceforge.net/tracker2/?func=detail&aid=2675510&group_id=184600&atid=909907

           
          • Shocker

            Shocker - 2009-03-12

            Thanks!!!
            I followed them (actually, when I was playing around trying to get it to work, I had followed all those steps)

            This is what I get from Dav.log

            2009-03-11 19:42:56,434 WARN  [LdapConnection-53102] davmail  - Unsupported filter
            2009-03-11 19:42:56,434 WARN  [LdapConnection-53102] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:56,434 WARN  [LdapConnection-53102] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:56,434 ERROR [LdapConnection-53102] davmail  -
            com.sun.jndi.ldap.Ber$DecodeException: Encountered ASN.1 tag -92 (expected tag 4)
                at com.sun.jndi.ldap.BerDecoder.parseStringWithTag(BerDecoder.java:226)
                at com.sun.jndi.ldap.BerDecoder.parseString(BerDecoder.java:204)
                at davmail.ldap.LdapConnection.parseSimpleFilter(LdapConnection.java:467)
                at davmail.ldap.LdapConnection.parseFilter(LdapConnection.java:456)
                at davmail.ldap.LdapConnection.handleRequest(LdapConnection.java:337)
                at davmail.ldap.LdapConnection.run(LdapConnection.java:271)
            2009-03-11 19:42:57,029 WARN  [LdapConnection-53105] davmail  - Unsupported filter
            2009-03-11 19:42:57,029 WARN  [LdapConnection-53105] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,030 WARN  [LdapConnection-53105] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,030 WARN  [LdapConnection-53105] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,030 WARN  [LdapConnection-53105] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,030 WARN  [LdapConnection-53105] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,030 ERROR [LdapConnection-53105] davmail  -
            com.sun.jndi.ldap.Ber$DecodeException: Encountered ASN.1 tag -92 (expected tag 4)
                at com.sun.jndi.ldap.BerDecoder.parseStringWithTag(BerDecoder.java:226)
                at com.sun.jndi.ldap.BerDecoder.parseString(BerDecoder.java:204)
                at davmail.ldap.LdapConnection.parseSimpleFilter(LdapConnection.java:467)
                at davmail.ldap.LdapConnection.parseFilter(LdapConnection.java:456)
                at davmail.ldap.LdapConnection.handleRequest(LdapConnection.java:337)
                at davmail.ldap.LdapConnection.run(LdapConnection.java:271)
            2009-03-11 19:42:57,633 WARN  [LdapConnection-53360] davmail  - Unsupported filter
            2009-03-11 19:42:57,633 WARN  [LdapConnection-53360] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,634 WARN  [LdapConnection-53360] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,634 WARN  [LdapConnection-53360] davmail  - Unsupported filter attribute: objectclass
            2009-03-11 19:42:57,634 ERROR [LdapConnection-53360] davmail  -
            com.sun.jndi.ldap.Ber$DecodeException: Encountered ASN.1 tag -92 (expected tag 4)
                at com.sun.jndi.ldap.BerDecoder.parseStringWithTag(BerDecoder.java:226)
                at com.sun.jndi.ldap.BerDecoder.parseString(BerDecoder.java:204)
                at davmail.ldap.LdapConnection.parseSimpleFilter(LdapConnection.java:467)
                at davmail.ldap.LdapConnection.parseFilter(LdapConnection.java:456)
                at davmail.ldap.LdapConnection.handleRequest(LdapConnection.java:337)
                at davmail.ldap.LdapConnection.run(LdapConnection.java:271)
            2009-03-11 19:42:58,379 WARN  [LdapConnection-53614] davmail  - Unsupported filter
            2009-03-11 19:42:58,379 ERROR [LdapConnection-53614] davmail  -
            com.sun.jndi.ldap.Ber$DecodeException: Encountered ASN.1 tag -93 (expected tag 4)
                at com.sun.jndi.ldap.BerDecoder.parseStringWithTag(BerDecoder.java:226)
                at com.sun.jndi.ldap.BerDecoder.parseString(BerDecoder.java:204)
                at davmail.ldap.LdapConnection.parseSimpleFilter(LdapConnection.java:467)
                at davmail.ldap.LdapConnection.parseFilter(LdapConnection.java:456)
                at davmail.ldap.LdapConnection.handleRequest(LdapConnection.java:337)
                at davmail.ldap.LdapConnection.run(LdapConnection.java:271)
            2009-03-11 19:42:58,872 WARN  [LdapConnection-53619] davmail  - Unsupported filter
            2009-03-11 19:42:58,872 ERROR [LdapConnection-53619] davmail  -
            com.sun.jndi.ldap.Ber$DecodeException: Encountered ASN.1 tag -93 (expected tag 4)
                at com.sun.jndi.ldap.BerDecoder.parseStringWithTag(BerDecoder.java:226)
                at com.sun.jndi.ldap.BerDecoder.parseString(BerDecoder.java:204)
                at davmail.ldap.LdapConnection.parseSimpleFilter(LdapConnection.java:467)
                at davmail.ldap.LdapConnection.parseFilter(LdapConnection.java:456)
                at davmail.ldap.LdapConnection.handleRequest(LdapConnection.java:337)
                at davmail.ldap.LdapConnection.run(LdapConnection.java:271)

             
          • Shocker

            Shocker - 2009-03-12

            also.
            for reference our LDAP search path is

            ou=active,ou=employees,ou=people,o=abc.com

            BTW, I tried both in the Directory Utility.

             
          • Shocker

            Shocker - 2009-03-12

            Sorry for the multiple posts.
            One wierd thing I notice.

            If I configure everything in Directory Utility to point to Davmail (localhost), I get the errors referenced above. (that is is using ou=people, or ou=active,ou=employees,ou=people,o=abc.com).  Either way it fails

            If I configure the LDAP config in Address Book itself using Davmail@localhost with ou=people my lookups in Address Book work with no errors, however, iCal lookups still fail.

             
            • DMF

              DMF - 2009-03-12

              Based on your log, it looks like you aren't using the correct version of LdapConnection.java (you wouldn't be seeing the "unsupported filter" messages for "objectclass" if you were).

              The changes to LdapConnection are not checked in to svn. You'll need to take the version from the feature request and compile that into your version of DavMail.

               
              • Mickael Guessant

                You are too fast for me ;-)

                Gavin is right: the latest commit (434) contains only non apple updates on complex filter handling, I now rebuild LDAP filter string to be able to debug the iCal stuff afterwards.

                I will update the RFE with the latest "apple aware" LdapConnection

                 
                • Shocker

                  Shocker - 2009-03-12

                  Fast because Entourage sucks and we need a tool to replace it.  Davmail and iCal are the answer.
                  Fast because RSS works ;)

                  Keep up the good work, I know I am looking forward to it, and I think this is one of the final pieces of the puzzle.  I've also got several hundred fellow Mac users that are itching to get rid of Entourage.

                  Next, is central server scalability... :)

                  Let me know what i can do to assist.

                  Thanks for all your hard work, and also thanks for the Donate button, i know of 1 or 2 that have already placed a few bucks in there.

                   
                  • Mickael Guessant

                    Last version of the "iCal completion" code committed and included in latest 3.1.0 release. However, I did not manage to make it work on my test platform...

                    I also wish to thank the donors (swasko, gkwait and fayep) for their support !

                     
    • Faye Pearson

      Faye Pearson - 2009-03-07

      If I enter real names, rather than email addresses then a 404 is returned internally to DAVMail, but the contact is still shown as ticked.

      This is what I get when I attempt a free/busy lookup.  Free/Busy does not show up.

      2009-03-07 15:12:18,964 DEBUG [CaldavServer] davmail  - Connection from /127.0.0.1 on port 1080
      2009-03-07 15:12:18,968 DEBUG [CaldavConnection-55324] davmail  - < POST /users/faye.pearson@betfair.com/out
      box/ HTTP/1.1
      2009-03-07 15:12:18,968 DEBUG [CaldavConnection-55324] davmail  - < User-Agent: DAVKit/3.0.6 (653); Calendar
      Store/3.0.6 (847); iCal/3.0.6 (1273); Mac OS X/10.5.6 (9G55)
      2009-03-07 15:12:18,968 DEBUG [CaldavConnection-55324] davmail  - < Authorization: ********
      2009-03-07 15:12:18,968 DEBUG [CaldavConnection-55324] davmail  - < Recipient: mailto:faye.pearson@betfair.com, mailto:Karl.Shrubb@betfair.com
      2009-03-07 15:12:18,968 DEBUG [CaldavConnection-55324] davmail  - < Content-Type: text/calendar
      2009-03-07 15:12:18,969 DEBUG [CaldavConnection-55324] davmail  - < Originator: mailto:faye.pearson@betfair.
      com
      2009-03-07 15:12:18,969 DEBUG [CaldavConnection-55324] davmail  - < Content-Length: 579
      2009-03-07 15:12:18,969 DEBUG [CaldavConnection-55324] davmail  - < Connection: keep-alive
      2009-03-07 15:12:18,969 DEBUG [CaldavConnection-55324] davmail  - < Host: localhost:1080
      2009-03-07 15:12:18,969 DEBUG [CaldavConnection-55324] davmail  - <

      2009-03-07 15:12:19,104 INFO  [CaldavConnection-55324] org.apache.commons.httpclient.HttpMethodBase  - Redir
      ect requested but followRedirects is disabled
      2009-03-07 15:12:19,105 DEBUG [CaldavConnection-55324] davmail.exchange.ExchangeSession  - Test configuratio
      n status: 302

      2009-03-07 15:12:19,105 DEBUG [CaldavConnection-55324] davmail.exchange.ExchangeSession  - Got session davma
      il.exchange.ExchangeSession@e2e4d7 from pool
      2009-03-07 15:12:19,922 DEBUG [CaldavConnection-55324] davmail  - > HTTP/1.1 200 OK
      2009-03-07 15:12:19,922 DEBUG [CaldavConnection-55324] davmail  - > Server: DavMail Gateway
      2009-03-07 15:12:19,922 DEBUG [CaldavConnection-55324] davmail  - > DAV: 1, 2, 3, access-control, calendar-a
      ccess, ticket, calendar-schedule, calendarserver-private-events
      2009-03-07 15:12:19,923 DEBUG [CaldavConnection-55324] davmail  - > Date: Sat, 07 Mar 2009 15:12:19 +0000
      2009-03-07 15:12:19,923 DEBUG [CaldavConnection-55324] davmail  - > Content-Type: text/xml;charset=UTF-8
      2009-03-07 15:12:19,923 DEBUG [CaldavConnection-55324] davmail  - > Connection: keep-alive
      2009-03-07 15:12:19,923 DEBUG [CaldavConnection-55324] davmail  - > Content-Length: 1588
      2009-03-07 15:12:19,923 DEBUG [CaldavConnection-55324] davmail  - >
      2009-03-07 15:12:19,927 DEBUG [CaldavConnection-55324] davmail.exchange.ExchangeSession  - Pooled session: d
      avmail.exchange.ExchangeSession@e2e4d7

      I also commonly see the "redirect requested but followRedirects is disabled" message when it's retrieving new calendar events.

       
      • Mickael Guessant

        The "redirect requested but followRedirects is disabled" is not an issue: this message is generated during the checkConfig call that checks server availability.

         
    • Shocker

      Shocker - 2009-03-12

      Just tried again with SVN 434.

      Getting closer.  Looks like iCal is looking for some more info in the filter?

      I can now successfully lookup within Address Book while going through Davmail. (IE: No errors and results are displayed)

      In iCal, when I search for someone I get this in Davlog

      akwait:davmail-linux-x86-3.1.0 gakwait$ ./davmail.sh
      2009-03-12 09:44:46,951 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = apple-configuration
      2009-03-12 09:44:46,953 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = organizationalUnit
      2009-03-12 09:44:46,953 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: ou = ldapreplicas
      2009-03-12 09:44:47,498 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = inetOrgPerson
      2009-03-12 09:44:47,498 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = posixAccount
      2009-03-12 09:44:47,498 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = shadowAccount
      2009-03-12 09:44:47,499 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = apple-user
      2009-03-12 09:44:47,499 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = extensibleObject
      2009-03-12 09:44:47,508 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = apple-resource
      2009-03-12 09:44:47,508 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: apple-realname = jdoe
      2009-03-12 09:44:47,513 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = posixGroup
      2009-03-12 09:44:47,513 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = apple-group
      2009-03-12 09:44:47,514 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: objectclass = extensibleObject
      2009-03-12 09:44:47,514 WARN  [LdapConnection-54582] davmail  - Unsupported filter attribute: apple-group-realname = jdoe

       
    • Shocker

      Shocker - 2009-04-10

      I noticed something interesting with the LDAP look up.

      It appears the search strings are not combined together.  For instance:

      If I search for "gavin"  results that begin with Gavin are displayed

      If I search for "Gavin Smith" results for Smith are returned.  Where it should be searching for the entire query "Gavin Smith"

      Thanks.

       
      • Mickael Guessant

        Could you please provide more details on the search filter used ?

        I just committed a new debug log call to get detailed galfind requests.

         
    • Shocker

      Shocker - 2009-04-10

      Sorry, Maybe someday I'll learn to combine all my thoughts in in one post.

      Perhaps from a performance point of view we could limit the search results to 25 or 50 to prevent looonnnngggg search times.

      Thanks.

       
      • Mickael Guessant

        Well, DavMail already supports sizelimit: you should be able to set a size limit in client settings.

         
        • Shocker

          Shocker - 2009-04-13

          Which setting in davmail.properties limits the search length?  I didn't see it in there.
          Thanks.

           
          • Mickael Guessant

            This is not a DavMail property, but a client side setting (advanced tab in Thunderbird address book).

             
            • Shocker

              Shocker - 2009-04-14

              Oh.  I am using iCal.

              Any luck with the name regression thing?

               
              • Mickael Guessant

                Nope, I would need more details on the expected/actual behavior with associated logs (with latest SVN).

                 

Log in to post a comment.