Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Sabre-Zarafa 0.15: patches for Public Contacts support

  1. #1

    Sabre-Zarafa 0.15: patches for Public Contacts support

    Here is a patchset on top of Sabre-Zarafa 0.15 that introduces rudimentary Public Contacts support. The patches apply cleanly on the 0.15 release tarball when applied in order. I publish them here because my attempts at getting them merged upstream have so far not succeeded. Hopefully the community can offer improvements, so that this important functionality can be hammered down properly.

    Buyer beware: these patches are not well tested and have known shortcomings. They are presented for informational purposes only, there is absolutely no warranty.

    Patch 0001 turns off the debug log, which is appropriate for a production server. Skip that patch if you want to keep the logging.

    Some known issues with these patches include:
    - If no GUID available for the vCard, create one on-the-fly by md5summing the EntryID. That works fine, but the EntryID is not guaranteed to be immutable. So it's not a very good GUID. Sufficient in practice, though.
    - Writing back to public address books for which you have only read rights will fail silently.
    - The patched code makes an attempt to hide deleted folders, but as tests on our live server show, not all deleted folders are successfully found. (Folders in Admin > Deleted Items, to be precise.)
    - The code does a walk over all entries in all tables, which is quite slow.

    Comments and improvements are very welcome!
    Last edited by goldengoose; 21-09-2012 at 05:46 PM. Reason: Removed comment about failing directory deletion - that was different DAV software.

  2. #2

    Sabre-Zarafa 0.15: second patchset

    Here's a second patchset that supercedes the first. It contains all the changes made by the first, plus some improvements:

    The patches are for Sabre-Zarafa 0.15, but you may need to change the line endings from Windows to Unix, and/or toggle the executable bit before they fit. Again, as before, this code comes with absolutely no warranty.

  3. #3
    Junior Member
    Join Date
    Dec 2012

    checkout complete repo

    first thx for the patches! i would love to apply them to my sabra-zarafa folder.
    is there a complete repo including the patches? or since i have no experience in applying the patches how would it be done?

    thx in advance


  4. #4
    Thanks for your interest. There is currently no complete repo that includes the patches. I have tried to push them upstream, but it seems that the original author of Sabre-Zarafa has lost interest in the project. To apply the patches, first download and unzip the Sabre-Zarafa 0.15 tarball. Then download all the patches from the links above. Then, assuming you're on some sort of Unix:

    cd /path/to/sabre-zarafa-0.15
    for i in vcard/VCard{Parser,Producer}.php Zarafa{Bridge,CardDavBackend}.php; do fromdos < "$i" > a; mv a "$i"; done
    patch -p1 < /path/to/patches/0001-VCardParser.php-add-support-for-FAX-property.patch
    patch -p1 < /path/to/patches/0002-ZarafaBridge-use-tag-array-to-restrict-size-of-db-re.patch

    Please don't apply this directly on a live install, use a temporary copy for testing. if you don't have 'fromdos' or the patches fail to apply, it may clobber the install.
    The for-loop that converts the line endings from Windows to Unix is unfortunate, but I couldn't seem to produce patches with the original Windows line endings in them, something to do with my Git repo settings I think.
    Last edited by goldengoose; 02-01-2013 at 04:52 PM. Reason: Add warning to test on a non-live copy first.

  5. #5
    Junior Member
    Join Date
    Dec 2012
    thank you so much for your help! I run a debian linux system so i will be fine with your instructions... gonna apply the patch tomorow! Will tell you how it worked for me.

  6. #6
    Junior Member
    Join Date
    Dec 2012
    patched it and it works fine! can confirm speed improvement when loading the whole addressbook... THX for all the efforts

  7. #7
    Junior Member
    Join Date
    Dec 2012
    Hello mowsw

    can u tell me which version of thunderbird, sogo and zarafa u are using?

    Thanks in advance


  8. #8
    Junior Member
    Join Date
    Dec 2012
    Hello goldengoose, hello mowsw,

    I tried your suggestion about the patches from your post above. Unfortunately your fromdos command didn't work on my debain system. A small modification and it works like a charme

    for i in vcard/VCard{Parser,Producer}.php Zarafa{Bridge,CardDavBackend}.php; do fromdos "$i" ; done

    May be its something special on a debian system - who cares ;-). Anyway, I patched the sources but ... what should I say - it doesn't work for me.

    I see (in debug.txt and in wireshark) that the vcard ist produced well but it does not appear in thunderbird (sometimes one contact appears but no other of the created and sended ones).

    My Serverside Configuration
    Zarafa 7.1.2
    sabre-zarafa with the patches u mentioned above

    Thunderbird 10.0.11 (Icedove)
    Sogo connector 10.0.4

    On my Windows System
    Win7 Home
    Thunderbird 17.0.2 ESR
    Sogo connector 17.0.2

    Same Problem - only one contact was sync - wireshark and debug.txt shows the delivery of all contacts but only one appears in the addressbook

    Are there any more informations who i can provide to debug the problem?

    Kind regards

    Last edited by chewyf5; 10-01-2013 at 12:55 AM. Reason: add windows system test

  9. #9
    Having only one contact can occur when all the vCards have the same "filename" (CardDAV URI): all the cards will be considered "duplicates" of each other, and only the last card will be shown. Could you please check if that is the case?

    URI's are generated by taking the md5sum of the Zarafa EntryID, which should be unique. The code is in this patch: 0006-If-no-PR_CARDDAV_URI-available-generate-one-from-the.patch

  10. #10
    Junior Member
    Join Date
    Dec 2012
    Hello goldengoose,

    To verify i checked the vcf files via webbrowser and via wireshark during a sync with sogo. As result, all vcf-files have different names. And the content differs as well.
    For double check - i checked the patch - its commited to my sources. In the meantime i checked emclient on windows - and it works. Syncronisation in from an "ipad contact via z-push" to windows with running emclient via carddav as well as backwarts and so on ...
    Even with os x addressbook (carddav) to emclient. Reading and writing as well as changing works like a charm. So in my opinion i think this is a more than less a client issue. I think the sogo plugin works not as well as Expected

    I downloaded the sources ofe the plugin from the website. But right now i am not able to compile and debug it. If u have a "how to complie and debug tb plugins"-site in mind please let me know.

    Kind regards

    Last edited by chewyf5; 13-01-2013 at 01:40 PM. Reason: Some typos

Page 1 of 3 123 LastLast

Similar Threads

  1. Public Folder Contacts
    By LargeAssy in forum Outlook usage Archives
    Replies: 1
    Last Post: 23-11-2010, 09:32 PM
  2. Read Contacts from Public
    By onegroup in forum PHP Development Archives
    Replies: 7
    Last Post: 28-10-2010, 01:48 PM
  3. exchange public contacts folder to zarafa
    By jtorrents in forum Migration Archives
    Replies: 4
    Last Post: 12-02-2010, 03:34 PM
  4. Outlook / index wih lookout / Offline Public Folder Support
    By mwmail in forum Outlook usage Archives
    Replies: 6
    Last Post: 06-11-2008, 09:47 AM
  5. syncing mobile contacts with public folder contacts
    By tinus01 in forum Mobile devices Archives
    Replies: 2
    Last Post: 01-02-2008, 05:28 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts