Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with zimbra contacts? #3

Open
MACscr opened this issue Feb 11, 2012 · 9 comments
Open

Compatible with zimbra contacts? #3

MACscr opened this issue Feb 11, 2012 · 9 comments
Assignees

Comments

@MACscr
Copy link

MACscr commented Feb 11, 2012

require_once('carddav.php');

$carddav = new carddav_backend('https://domain.com/dav/[email protected]/contacts/');
$carddav->set_auth('[email protected]', 'test1233');
var_dump($carddav->check_connection());

been trying to connect to my zimbra 7.13 zimbra server, but only getting false back. Havent gotten any errors or debug information at all. Any ideas?

@MACscr
Copy link
Author

MACscr commented Feb 11, 2012

Ah, so i wasnt thinking, the user/pass i was sharing with was an external user that obviously wouldnt have edit abilities, etc. So anyway, i switched it to an internal user and now i get true for connection, but when i try to do a var dump on the $carddav->get(), I only get a response of:

string(51) "<?xml version="1.0" encoding="UTF-8"?>
<response/>
"

@MACscr
Copy link
Author

MACscr commented Feb 11, 2012

Ok, so i updated things to var_dump($carddav->get(true,true)); and I get the following response when viewing the page source:

<D:multistatus xmlns:D="DAV:"> <D:response> <D:href>/dav/[email protected]/contacts/</D:href> <D:propstat> <D:status>HTTP/1.1 200 OK</D:status> <D:prop> <D:supported-report-set> <D:supported-report> <D:report> <C:addressbook-multiget xmlns:C="urn:ietf:params:xml:ns:carddav"/> </D:report> </D:supported-report> <D:supported-report> <D:report> <C:addressbook-query xmlns:C="urn:ietf:params:xml:ns:carddav"/> </D:report> </D:supported-report> <D:supported-report> <D:report> <D:acl-principal-prop-set/> </D:report> </D:supported-report> <D:supported-report> <D:report> <D:principal-match/> </D:report> </D:supported-report> <D:supported-report> <D:report> <D:principal-property-search/> </D:report> </D:supported-report> <D:supported-report> <D:report> <D:principal-search-property-set/> </D:report> </D:supported-report> <D:supported-report> <D:report> <D:expand-property/> </D:report> </D:supported-report> </D:supported-report-set> <CS:getctag xmlns:CS="http://calendarserver.org/ns/">248163-248155</CS:getctag> <D:resourcetype> <D:collection/> <C:addressbook xmlns:C="urn:ietf:params:xml:ns:carddav"/> </D:resourcetype> <D:getcontentlength>0</D:getcontentlength> <D:getlastmodified>Sat, 11 Feb 2012 03:25:51 -0600 (CST)</D:getlastmodified> <C:addressbook-description xmlns:C="urn:ietf:params:xml:ns:carddav" xml:lang="en_US">Joe Blow's Contacts</C:addressbook-description> <D:displayname>Contacts</D:displayname> <D:getetag>"248163-1"</D:getetag> <D:creationdate>2010-06-23T02:03:51-05:00</D:creationdate> </D:prop> </D:propstat> </D:response> </D:multistatus>

But obviously thats not that useful (unless im missing something) as I need to get a list of contacts or vcard id's or somethign like that, right? I apologize if Im missing something obvious.

@christian-putzke
Copy link
Owner

I've never tested a Zimbra-Server. It would be great if you can provide and send me a test-account for some days of testing to [email protected].

Nevertheless it seems that the URL ist not complete. I think the URL have to look like that:
https://domain.com/dav/[email protected]/contacts/{resource|principal|username}/{collection}/

@christian-putzke
Copy link
Owner

Forgot my first comment, your URL should be correct.
I've created a 14 day test account ont the official zimbra website and tested a few hours but I didn't get any useful result :(
Then I've tried to sync the contacts with this Android Plugin (http://dmfs.org/carddav/) but it didn't work as well. I'm not sure wehre the error is but I'll let you know if I find something interesting.

@MACscr
Copy link
Author

MACscr commented Feb 12, 2012

It works with the apple address book for osx and iphone if that means anything.

Christian Putzke [email protected] wrote:

Forgot my first comment, your URL should be correct.
I've created a 14 day test account ont the official zimbra website and
tested a few hours but I didn't get any useful result :(
Then I've tried to sync the contacts with this Android Plugin
(http://dmfs.org/carddav/) but it didn't work as well. I'm not sure
wehre the error is but I'll let you know if I find something
interesting.


Reply to this email directly or view it on GitHub:
#3 (comment)

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

@imagetag
Copy link

I just came across the same problem. I've checked the Zimbra response and it seems that the server isn't able to handle the PROPFIND method. It answers with a 501, at least here. Changing or removing the method makes the server return some CSV Data. Well this is not what carddav was made for.

@imagetag
Copy link

Forget my first comment, too :) The guys gave me the wrong uri. I'll keep u informed.

@christian-putzke
Copy link
Owner

Thanks for your comments. It seems that Zimbra does have a different xml query handling like other CardDAV-Servers but I'm not sure how to figure out what exactly is different. I'll let you know if I find something interesting.

@anybug
Copy link

anybug commented Jan 2, 2013

hi, i'm encountering same problem and same diagnostic as imagetag: reading a vcard works find but i can't write or delete, having error 401.
So I tried something else: import a vcard (file.vcf) with curl via URL https://server.com/service/home/username/contacts?fmt=vcf, it did work but it's just an importation feature, not synchronization. If i import several times the same file.vcf, it just creates several contacts.
did you manage to figure out what's wrong with authentication ? i'll let you know if i can get it work someday...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants