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

How to get Contacts to populate Roundcube 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

Mac mini, OS X Server, 8GB

Posted on Sep 18, 2012 9:08 AM

Reply
14 replies

Sep 18, 2012 10:23 AM in response to JaimeMagiera

I followed that tutorial a while back and retried it today because you pointed it out, but without any luck I believe because they use an old version of Roundcube and an old version of OS X Server.


Webmail just stopped functioning completely just as it did before, so I reverted to the main.inc.php.bak file that I made prior to trying the suggested link.

Sep 21, 2012 9:55 AM in response to Mark23

Hey Mark,


I'm still working on the issue with Roundcube 0.8.1 and Graviox carddav plugin.


I think we have similar of not the same issue as with Davical Server

https://github.com/graviox/Roundcube-CardDAV/issues/28

https://github.com/graviox/Roundcube-CardDAV/issues/29


I tried their suggestions.. but still doesn't work..


but i'm sure it has to do with the PROPFIND....


I was thinking of installing somekind of PHP debugger and see what's going on...

Dec 21, 2012 9:06 PM in response to kunikatsu

Manage to get carddav on roundcube. (refer to https://discussions.apple.com/thread/4153247?answerId=20246429022#20246429022 for setting up roundcube)


1.downloading the latest version carddav plugin at http://www.crash-override.net/carddav.html

2.opening it would give you a carddav_0.7.0 folder

3.rename the folder to 'carddav' and moved the folder in to plugins folder of roundcube

4.run sudo for your roundcube database(must be the same as your roundcube database.)


For postgre sql example:

sudo psql -U roundcube -d rcwebmail

\c - roundcube

\i /opt/webapps/rcwebmail/plugins/carddav/dbinit/postgres.sql

\q


5. edit main.inc.php


for example:

cd /opt/webapps/rcwebmail/config/

sudo nano main.inc.php


Look for under plugins:

$rcmail_config['plugins'] = array('managesieve','autologon');


add carddav in

$rcmail_config['plugins'] = array('managesieve','autologon','carddav');


Ctrl-x (control and "x" key at same time)

y

Press "Return" Key


Speacial thanks to Gerry. 😉

Dec 22, 2012 9:05 AM in response to hrachor

I am finally sending log webmail:


[22-Dec-2012 16:46:05 UTC] MDB2 Error: insufficient permissions (-27): _doQuery: [Error message: Could not execute statement]

[Last executed query: EXECUTE mdb2_statement_pgsql_35ae355a113e64cecdea63f9a4553d1e2e073a76a ('10')]

[Native message: ERROR: permission denied for relation carddav_addressbooks]



[22-Dec-2012 17:46:05 +0100]: DB Error: MDB2 Error: insufficient permissions Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_pgsql_35ae355a113e64cecdea63f9a4553d1e2e073a76a ('10')] [Native message: ERROR: permission denied for relation carddav_addressbooks] in /usr/share/webmail/program/include/rcube_mdb2.php on line 713 (GET /webmail/?_task=settings)


Thank you Tom

Dec 26, 2012 12:46 AM in response to Mark23

Dear All,


I managed to find something that make it work. Will like to add on my post on Dec 21, 2012 9:06 PM.


After you are done with my post on Dec 21, 2012 9:06 PM. Log on to Roundcube.


under setting look for card dav.


You will be ask to key in the name of the addressbook (will be the name of the addressbook in roundcube), username and password, url:

(https://example.com:8843/addressbooks/users/[username]/addressbook/)


then save you will see the carddav address book under Address book. 😉 cheers!

Oct 3, 2013 2:22 AM in response to Mark23

For those who are still struggling.


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


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

It will connect at least. Now you'll face some sync issues. Replace this line:


$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);


Now you can sync, view, modify and delete.


Finally I cannot add contact. But I am pretty close to that as well.

Oct 3, 2013 3:35 AM in response to Mark23

To add new contacts:


Modify function add($vcard) and add below this line:

$vcard_id = $this->generate_vcard_id();

The following line:

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

Now you can create new contact. It will still generate an error but the card itself will be created on your server. 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 everything should work. Create, modify and delete. Enjoy! 🙂

How to get Contacts to populate Roundcube webmail?

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