Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Use Contacts (Address Book) Server's data via webmail?

L.S.,


Installing Roundcube webmail wasn't a problem after I knew what to do once more 🙂

Now I want the stored data from the Contacts Server to be used in webmail whenever a user logs into webmail.


I couldn't get this to work in Lion, but then again I never asked here, so I did not really walk the extra mile 😀


Now I feel like trying anew, so does anyone have the answer on how to auto populate or sync the Roundcube address Book?


Any thoughts are appreciated!


regards,


Mark

OS X Server, 8GB, 2,93 GHz Intel Core 2 Duo

Posted on Aug 7, 2012 8:34 AM

Reply
Question marked as Best reply

Posted on Aug 7, 2012 2:33 PM

Hi Mark,


Try adding the Roundcube Carddav plugin


See https://github.com/graviox/Roundcube-CardDAV/blob/master/README for details on setting up with the Contacts Server.


I haven't tried it but let us know how you go!

Gerry

15 replies

Aug 8, 2012 3:06 AM in response to Mark23

i've attempted to use the gravoix carddav plugin, but can't seem to get it to work when trying to sync it.

I get a


CardDAV-Server XML-Response is malformed. Synchronization aborted!


Note: i'm currently using roundcube 0.8 which was just released just yesterday.


Mark - let me know if you get it to work or not..



Note: my roundcube is setup to use mysql

Oct 3, 2013 4:39 AM in response to capitanu

OK for me it works after hours of struggling. Let's make a long story short. I hope it is clear enough.


My config is:


OSX Server 10.8

Roundcube 0.9.3

Carddav plugin 0.5.1 (found here: https://github.com/graviox/Roundcube-CardDAV)


Symptom 1)

Could not add an Addressbook server because it reported that "CarDAV server cannot be connected" or something similar.


Solution:


Comment out the following line within your carddav_backend.php file:

// curl_setopt($this->curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

Actually we face an authentication issue here. Since my mail server is the same as my roundcube server I do not mind if it will use plaintext, digest or something else.


Symptom 2)

After finally being able to connect I could not sync.


Solution

I found the solution somewhere on the net. (Sorry I cannot cite the name of the site but if you are interested of the source google is your friend.) My credits for those guys of course.


Replace this line in carddav_backend.php:

$response = $this->query($this->url, 'PROPFIND');

With these lines:

$content = '<?xml version="1.0" encoding="utf-8" ?>

<D:sync-collection xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">

<D:sync-token></D:sync-token>

<D:sync-level>1</D:sync-level>

<D:prop><D:getcontenttype/><D:getetag/><D:allprop/>

<C:address-data><C:allprop/></C:address-data></D:prop>

<C:filter/></D:sync-collection>';

$content_type = 'application/xml';

$response = $this->query($this->url, 'REPORT', $content, $content_type);



Symptom 3)

After being able to sync I could edit and delete existing contacts but I was unable to create a new one. Reason is that OSX server expects UID inside a new vcard. To achieve:


Modify function add($vcard) inside carddav_backend.php by adding below this line:

$vcard_id = $this->generate_vcard_id();

The following line:

$vcard = str_replace('END:VCARD' , 'UID:' . $vcard_id . "\n" . 'END:VCARD', $vcard);

Symptom 4)

Even I could create a new contact after saving the card I still received an error message. The card WAS created but still a save error occured.

So I lost my patience and I made a bit of hack here.


To remove that error message change the following line within carddav_addressbook.php inside carddav_add($vcard) function:

$rcmail->db->insert_id(get_table_name('carddav_contacts'));

to this:

return true;


Now it works pretty well! Syncs, adds, deletes, modifies contacts.


And sorry for my English.

Use Contacts (Address Book) Server's data via webmail?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.