mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #120] CardDAV and CalDAV Support #100
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chlarsen on GitHub (Sep 27, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/120
Originally assigned to: @jasonmunro on GitHub.
Dear Jason,
As CardDAV and CalDAV are pretty much standard among mobile devices (see the great DAVDroid app), it may be good to star thinking about CardDAV support for the addressbook (as a module) and CalDAV support for the calendar (again, as a module).
This would allow easy interaction with other applications, too.
Nothing urgent, just a thought. :-)
Thanks so much!
Chris
@jasonmunro commented on GitHub (Sep 27, 2016):
I will look into it. Thanks for the suggestion!
@dhuyvetter commented on GitHub (Oct 7, 2016):
Would be nice to be able to integrate OwnCloud, which supports CardDAV and CalDAV.
@NodokaMurmevent commented on GitHub (Oct 20, 2016):
caldav + cardav it's a must have ! i desperately search a web-mail how integrate this.
@chlarsen commented on GitHub (Oct 25, 2016):
As there is already a integration of GMail contacts, this may be not all
too painful to achieve. And, yes, Cypht is coming in leaps and bounds -
thanks Jason!
C.
@conspacer commented on GitHub (Nov 23, 2016):
+1 for CardDAV and CalDAV modules. Additionally it could be a module for OwnCloud/NextCloud with checkboxes for those different options.
@renaudallard commented on GitHub (Nov 25, 2016):
My comment won't probably help, but it seems other projects use the sabredav client to connect to caldav/carddav servers. Maybe you could get inspiration from there.
@jasonmunro commented on GitHub (Nov 30, 2016):
@renaudallard I appreciate the feedback, I will check sabredav out. Thanks again!
@Yamakasi commented on GitHub (Feb 11, 2018):
I don't know if this is still something too look at but I have investigated most of them in the past and the most flexible solution was SQL based:
http://sabre.io/baikal/
https://github.com/sabre-io/Baikal
This was in the past on it's own domain bailkal-server.com
@jasonmunro commented on GitHub (Sep 25, 2018):
FWIW, I have started on some low level support for WebDav related protocols:
At first I'm hoping to support read-only CardDav sources for contacts as that (I think) will be the easiest to integrate to get started :)
@jasonmunro commented on GitHub (Nov 9, 2018):
Initial CardDav contact support is pushed to the master branch! I used Radicale to test against, and the Sabredav docs to figure out the discovery flow. I'm sure there will be compatibility issues but it's a start!
@omocinteractive commented on GitHub (Nov 11, 2018):
It's a bug? I can configure the CardDav Addressbooks (PW/Username), but a can't see 'Addressbooks' on navigation.
@jasonmunro commented on GitHub (Nov 12, 2018):
@omocinteractive CardDav addresses should be visible on the Contacts page from the Main menu.
@omocinteractive commented on GitHub (Nov 12, 2018):
@jasonmunro commented on GitHub (Nov 12, 2018):
@omocinteractive you need to enable both the contacts and carddav_contacts module sets in your hm3.ini file, and re-run the config gen script. The contacts module is a generic module that all the other contacts sources use (carddav, ldap, local, gmail).
@omocinteractive commented on GitHub (Nov 12, 2018):
... so? There is no different ...

@jasonmunro commented on GitHub (Nov 12, 2018):
@omocinteractive The module set you need is is "contacts", not "local_contacts". Local contacts is another contact source backend.
https://github.com/jasonmunro/cypht/blob/master/hm3.sample.ini#L520-L525
@omocinteractive commented on GitHub (Nov 12, 2018):
... ah, okay. Now, 'contacts' is visible ;) But no contacts. I will have a look into the logfile later ...
@jasonmunro commented on GitHub (Nov 12, 2018):
I'm not terribly surprised. I have only done very limited testing with this. I will add some additional debugging to the flow because right now it's not very obvious where things fail. Thanks for trying it out!
@jasonmunro commented on GitHub (Nov 12, 2018):
@omocinteractive Just pushed a bunch of carddav related debugging to the master branch. If you run Cypht in debug mode, and access the contacts page, you should get a bunch of carddav related debug statements in your PHP log.
@omocinteractive commented on GitHub (Nov 12, 2018):
... okay, in the moment i get this:
stderr: ), referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490563 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: Array, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490622 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: (, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490636 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [0] => Including site module set lib.php, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490648 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [1] => Using Hm_DB_Session with Hm_Auth_DB, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490660 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [2] => Using DB user configuration, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490672 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [3] => Using sapi: cgi-fcgi, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490683 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [4] => Request type: AJAX, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490694 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [5] => Request path: /mail-debug/, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490705 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [6] => TLS request: 1, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490712 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [7] => Mobile request: 0, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490719 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [8] => Page ID: ajax_imap_unread, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490725 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [9] => Memcached enabled but not supported by PHP, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490732 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [10] => CACHE backend using: noop, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490739 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [11] => Connecting to dsn: mysql:host=127.0.0.1;dbname=domain_tld, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490745 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [12] => LOGGED IN, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490752 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [13] => CACHE: saving "imap4" using noop, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490778 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [14] => PHP version 7.0.32, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490785 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [15] => Zend version 3.0.0, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490791 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [16] => Peak Memory: 6144, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490797 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [17] => PID: 30938, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490804 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: [18] => Included files: 59, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:15:46.490810 2018] [fcgid:warn] [pid 29211] [client 79.197.27.211:32856] mod_fcgid: stderr: ), referer: https://www.domain.tld/mail-debug/?page=contacts
@omocinteractive commented on GitHub (Nov 12, 2018):
[Mon Nov 12 21:23:38.391804 2018] [fcgid:warn] [pid 29591] [client 79.197.27.211:33394] mod_fcgid: stderr: [13] => CARDDAV: Sending discover XML: <d:propfind xmlns:d="DAV:"><d:prop><d:current-user-principal /></d:prop></d:propfind>, referer: https://www.domain.tld/mail-debug/?page=contacts
[Mon Nov 12 21:23:38.391806 2018] [fcgid:warn] [pid 29591] [client 79.197.27.211:33394] mod_fcgid: stderr: [14] => CARDDAV: No principal path discovered, referer: https://www.domain.tld/mail-debug/?page=contacts
@omocinteractive commented on GitHub (Nov 12, 2018):
... but no problem, no stress ;) I set some other debug-points on the fast, but i have to sleep. Good night!
@jasonmunro commented on GitHub (Nov 14, 2018):
@omocinteractive so this is the first step in the discover process. We take the url setup in the carddav_contacts.ini file, and send a PROPFIND request that should return XML defining the url path of the authenticated user. Then we use that to find the url of the addressbook(s), then finally we get the address vcards and parse them.
My guess here is that our XML parsing is not working properly and not finding the first url path we need. There should be another debug entry when this happens like:
CARDDAV: find for "path" failed in xml: "xml"
where "path" is the xpath we are using to search the xml, and "xml" is what your carddav server responded with. To troubleshoot this further, I need to see the xml that is returned here. Thanks!
@omocinteractive commented on GitHub (Nov 15, 2018):
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:response>
<d:href>/remote.php/dav/addressbooks/users/admin/default/</d:href>
<d:propstat>
<d:prop>
<d:current-user-principal>
<d:href>/remote.php/dav/principals/users/admin/</d:href>
</d:current-user-principal>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/dav/addressbooks/users/admin/default/C71ABC0D-0D80-1001-51CF-1CDB11301831.vcf</d:href>
<d:propstat>
<d:prop>
<d:current-user-principal>
<d:href>/remote.php/dav/principals/users/admin/</d:href>
</d:current-user-principal>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
...
@jasonmunro commented on GitHub (Nov 15, 2018):
@omocinteractive that was very helpful, thanks for the follow up. Our XML parsing was failing us. I just pushed a fix to the master branch that properly handles this response, and I think it might get the carddav module set working. If you can retest with the latest that would be great. Thanks!
@jasonmunro commented on GitHub (Mar 20, 2019):
Preliminary support for add/update/delete of carddav contacts is pushed to master. The edit form only supports a single E-mail, phone number, and display name for now, however the code is smart enough to maintain the other existing fields of the contact on update (they are not lost). Along with this update are a few other contacts related fixes and clean-ups.
@marclaporte commented on GitHub (Apr 29, 2020):
CalDAV and CardDAV are not yet supported by Cypht but here is some relevant info:
Tiki Wiki CMS Groupware now bundles Cypht, getting it via Packagist:
https://dev.tiki.org/Cypht-integration
https://packagist.org/packages/jason-munro/cypht
Also, CalDAV and CardDAV support has been added to Tiki via SabreDAV:
https://doc.tiki.org/CalDAV
https://doc.tiki.org/CardDAV
https://doc.tiki.org/SabreDAV
https://packagist.org/packages/sabre/dav (2.7 million installs!)
These additions are quite new so still a little rough around the edges :-) But we are committed to progressively improve the integration, and the components.
Additionally, Jason has gracefully accepted to change the license from GPL to LGPL to facilitate usage by the Tiki community.
https://github.com/jasonmunro/cypht/issues/333
This has a nice side-effect that code can easily be shared between the 2 projects. Thus, the Tiki CalDAV/CardDAV code could be ported to Cypht.
These are the big picture goals:
https://dev.tiki.org/Email-as-a-first-class-citizen
We are looking for developers and testers. Please join us:
https://gitter.im/cypht-org/community
Thanks!
@dumblob commented on GitHub (Apr 29, 2020):
Related: https://github.com/jasonmunro/cypht/issues/12
@marclaporte commented on GitHub (Aug 11, 2022):
Initial support for contacts from a CardDav server (read-only)
https://github.com/jasonmunro/cypht/tree/master/modules/carddav_contacts
@marclaporte commented on GitHub (Aug 19, 2022):
https://packagist.org/packages/sabre/dav is now at 6.3 million installs, and would make sense to have read and write CalDAV and CardDAV.
@undergroundwires commented on GitHub (Jan 6, 2023):
I've started experimenting with this great project. Looking forward for CalDAV support.
@ElvisAns commented on GitHub (Jan 19, 2023):
Should CardDav have its own page? Or we will have to see its effect as a contact backend?
I am confused about how this integration was made.
@marclaporte commented on GitHub (Aug 10, 2023):
Status report on this task:
I understand https://github.com/cypht-org/cypht/tree/master/modules/carddav_contacts is functional (last commit seemed to make user happy)
For https://github.com/cypht-org/cypht/tree/master/modules/calendar some work is needed. Any volunteers?
I use Cypht within Tiki so I'd rather focus my energies there, and have nice features like https://doc.tiki.org/Calendar-Invitations-by-email
And more calendar features are on the way, like more flexible recurrence, and appointment slots.
But I understand and support that some will want a better calendar in standalone Cypht (And I encourage that)
@marclaporte commented on GitHub (Sep 10, 2023):
The Tiki calendar is getting: CalDAV scheduling, free-busy, iTip and appointment slots:
https://gitlab.com/tikiwiki/tiki/-/merge_requests/3534
Cypht is well integrated within Tiki (like Roundcube within Kolab)