The Chronicles of CardDAV on macOS
Thanks for putting in all the work it must have taken to get CardDAV going.
Unfortunately I haven't been able to get a sync happening between macOS Contacts.app and the server.
What I've tried so far:
Deleting all contacts both locally and via Roundcube, then importing via Roundcube -- the contacts do not populate in Contacts.app.
Then the same as above but importing via Contacts.app -- the contacts do not populate in Roundcube.
I can connect to the WebDAV server via Finder.app, and see that
/webdav/NNN/carddav/default is populated with .vcf files of contacts imported via Roundcube.
If I alter a contact in Contacts.app, these changes do not propagate to Roundcube, even after selecting Settings > CardDAV > Force immediate synchronization with server. Also I can QuickLook the .vcf files accessible via WebDAV and see that changes have not propagated there either, and file modtime has not changed.
This suggests changes in Contacts.app are not propagating to the server at all.
If I go to the Purelymail account management page
/manage/user/NNN I can see that my webdav app password was used "moments ago". This seems to suggest that authentication is working okay. I've tried all this with the master password too.
I have 2FA required for my user.
Here are the settings I've tried in Contacts.app:
User Name: admin@MYDOMAIN.com Password: <APP PASSWORD> || <MASTER PASSWORD> Server Address: purelymail.com Server Path: /webdav/NNN/users/NNN || /webdav/NNN/carddav/
Something odd I've noticed is that
/webdav/NNN/users/NNN is a 0B file.
Sorry for the bad news. Any ideas?
(I wouldn't blame you if you threw WebDAV out entirely and went with LDAP...)
You may be experiencing a known issue with Mac OS's Contacts app. The gist is that on Mac OS, the contacts app has absolutely no way of dealing with a user ever having multiple address books on a CardDAV account. You are likely only seeing the one you aren't expecting, probably Automatic Addresses.
I'm not sure how to fix this on my end yet. (And I don't know what Apple is doing, they have this working fine on iOS.)
Something odd I’ve noticed is that /webdav/NNN/users/NNN is a 0B file.
That's expected actually, it's a "virtual" file that only exists to have some WebDAV useful properties.
Ah! Yes this is what it is. I saw the mention about the macOS problem with multiple address books and thought I'd checked, but I didn't wait long enough to see the .vcf files populate in
At least it's good to know the address book is propagating to the server.
Possibly a silly suggestion, but could this be solved by renaming the paths to something like this?
I'll try ordering (since other people with this issue also only needed to see Default). If it comes up that someone needs to see automatically collected, I might add some kind of hacky pragma to username logins that only shows one.
The macOS Mail.app has its own previous recipients database so there should be no need for anyone to access automaticallyCollected via CardDAV. The only scenario I can think of is someone who alternates between Roundcube and Mail.app wanting to autocomplete a previous recipient they've only messaged via Roundcube, in which case it's not too hard to just search in /Sent and click that recipient's address and New Email.
I think you can quite reasonably say that only Default address book is available via CardDAV on macOS due to Apple bugs. You've got better things to spend your time on than working around Apple's laziness!
Deleting a branch is permanent. It CANNOT be undone. Continue?