Anleitung MailStation carddav Plugin aktivieren.

Status
Für weitere Antworten geschlossen.

obimichael

Benutzer
Mitglied seit
28. Nov 2014
Beiträge
6
Punkte für Reaktionen
0
Punkte
0
Mit SSH und dann befindet sich das Log unter:

/volume1/@appstore/MailStation/roundcubemail/logs/errors

Bei mir ist die vcard_id definitiv länger als 10 Zeichen. Wenn wir beide Owncloud verwenden, und die Kontakte neu in Owncloud angelegt wurden, kann ich mir nicht vorstellen, dass ich 72 Zeichen habe, und Du nur 10 Zeichen ;-)

Michael
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Danke ich werde da mal reinschauen.

Mit 10 Zeichen meinte ich nur die domain + top level domain... Also folglich z.B. 'xxxxxxx.de'

Gruß
luddi
 

obimichael

Benutzer
Mitglied seit
28. Nov 2014
Beiträge
6
Punkte für Reaktionen
0
Punkte
0
Okay .. habe es jetzt verstanden :)
Du müßtest dann auf ungefähr 50 Zeichen für die vcard_id kommen.
Michael
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Also nun habe ich folgendes zu berichten:

Im error log file habe ich jedenfalls kein DB Error gefunden wie von dir erwähnt wurde.
Um ein sauberes und überschaubares log file zu bekommen habe ich die Dateien 'error' und 'CardDAV' gelöscht (bzw. umbenannt).

Zuerst beginnen wir mit dem Owncloud Adressbuch.
In der MailStation wurde das Owncloud Adressbuch neu angelegt (welches 1 einzigen Kontakt beinhaltet). Die Verbindung kommt Zustande und die Synchronisation meldet in der GUI auch wie bekanntlich 'Erfolgreich'.

Anschließend in das Verzeichnis '/volume1/@appstore/MailStation/roundcubemail/logs' hineingeschaut... hier gibt es aber kein 'error' file. Das einzige was neu angelegt wurde war das 'CardDAV' log file. In diesem ist zu der Synchronisation folgendes zu finden:

Rich (BBCode):
Starting CardDAV-Addressbook synchronization
Connected to the CardDAV-Server https://xxxxxxx.de/owncloud/remote.php/carddav/addressbooks/user2000/contacts
CardDAV-Server XML-Response is malformed. Synchronization aborted!


Als nächstes war dann der Baikal Server an der Reihe.
Auf dem Server wurde ein neuer User angelegt und somit gab es ein frisches Adressbuch (also ohne Inhalt).
Die Verbindung zu diesem Adressbuch wurde in der MailStation neu angelegt und auch dieses mit 'Erfolgreich' quittiert.
Wieder einen Blick in das log file 'CardDAV' geworfen und man findet folgende Information:

Rich (BBCode):
Connected to the CardDAV-Server https://10.88.66.2/baikal/card.php/addressbooks/user1000/default/
No CardDAV XML-Element found! The CardDAV-Server seems to have no contacts
all CardDAV-Data are synchronous, nothing todo!
Syncronization complete!

Dass noch keine Kontakte vorhanden sind scheint an dieser Stelle auch plausibel zu sein.
Anschließend wurde das Baikal Adressbuch unter Mac OS X 10.9 mit Hilfe des 'Kontakte' Tools eingebunden und ein einziger Kontakt erstellt.
Rich (BBCode):
BEGIN:VCARD
VERSION:2.1
PRODID:-//Apple Inc.//Mac OS X 10.9.5//EN
N:Mustermann;Max;;;
FN:Max Mustermann
EMAIL;INTERNET;HOME;pref:max.mustermann@domain.tld
TEL;CELL;VOICE;pref:+49171xxxxxxx
BDAY:YYYY-MM-DD
UID:50c7545a-c3a4-4a65-bc73-9bd92b037e99
X-ABUID:50C7545A-C3A4-4A65-BC73-9BD92B037E99:ABPerson
END:VCARD

Jetzt wurde in der MailStation die Synchronisation erneut angestoßen und im log file 'CardDAV' war folgendes zu finden:

Rich (BBCode):
Connected to the CardDAV-Server https://10.88.66.2/baikal/card.php/addressbooks/user1000/default/
Added CardDAV-Contact to the local database with the vCard id 50c7545a-c3a4-4a65-bc73-9bd92b037e99
Syncronization complete!

Es scheint so, dass zumindest die vCard id richtig ausgelesen wurde.

Jetzt stellt sich mir die Frage wo der Kontakt ist wenn er in der GUI der MailStation nicht zu sehen ist?

Gruß
luddi
 
Zuletzt bearbeitet:

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Und zu guter letzt habe ich nun nochmal das "produktive" Adressbuch der owncloud (mit exakt 159 Kontakten) in der MailStation eingebunden und das log file 'CardDAV' zeigt mir folgendes...

Rich (BBCode):
Connected to the CardDAV-Server https://xxxxxxx.de/owncloud/remote.php/carddav/addressbooks/luddi/contacts
Added CardDAV-Contact to the local database with the vCard id 7a9ed97b-16ae-42ef-9dfc-4ddc3cbeb25e
Added CardDAV-Contact to the local database with the vCard id 34f8463b-aa09-4fb2-bd0e-554efb890778
Added CardDAV-Contact to the local database with the vCard id 6cc7703f-e8ca-4674-bdb0-cdfc5971d96b
Added CardDAV-Contact to the local database with the vCard id 304eaf44-8809-4230-bdc1-d4d43064f948
Added CardDAV-Contact to the local database with the vCard id db177572-b884-4846-a5d6-ba7adc529d34
:
:
usw...

Jedenfalls bestehen alle vCard id´s aus dem gleichen Muster von 16 Bytes (4Bytes-2Bytes-2Bytes-2Bytes-6Bytes).

Gruß
luddi
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Ok, warum das error file noch nicht angelegt wurde weiß ich nun. Legt man die Adressbücher in der MailStation neu an und der initiale Sync erfolgt im Anschluss so gibt es noch keine errors. Startet man die Synchronisation durch drücken des Sync-Buttons manuell, so werden die entfernten (Server) Adressbücher mit den jeweils internen Adressbüchern verglichen und nun kommt es zu den Fehlermeldungen mit dem von dir berichteten 'DB Error'.

Hier ein Beispiel zu dem von mir erstellten Testkontakt aus Post #44 (Max Mustermann):

Rich (BBCode):
[16-Dec-2014 13:06:57 +0100]: DB Error: [7] ERROR:  duplicate key value violates unique constraint "carddav_contacts_pkey"
DETAIL:  Key (carddav_server_id, user_id, vcard_id)=(9, 1, 50c7545a-c3a4-4a65-bc73-9bd92b037e99) already exists. (SQL Query: INSERT INTO
				carddav_contacts (carddav_server_id, user_id, etag, last_modified, vcard_id, vcard, words, firstname, surname, name, email)
			VALUES
				('9', '1', 'bfe2b464c0271f910a20ec1b5a3405ab', 'Tue, 16 Dec 2014 11:56:32 GMT', '50c7545a-c3a4-4a65-bc73-9bd92b037e99', 'BEGIN:VCARD

VERSION:3.0

PRODID:-//Apple Inc.//Mac OS X 10.9.5//EN

N:Mustermann;Max;;;

FN:Max Mustermann

EMAIL;type=INTERNET;type=HOME;type=pref:max.mustermann@domain.tld

TEL;type=CELL;type=VOICE;type=pref:+49 171 xxxxxxx

BDAY:YYYY-MM-DD

REV:2014-12-16T11:56:28Z

UID:50c7545a-c3a4-4a65-bc73-9bd92b037e99

END:VCARD

', 'max mustermann 49171xxxxxxx max.mustermann@domain.tld', 'Max', 'Mustermann', 'Max Mustermann', 'max.mustermann@domain.tld')) in /volume1/@appstore/MailStation/roundcubemail/program/lib/Roundcube/rcube_db.php on line 467 (POST /mail/?_task=addressbook&_action=plugin.carddav-addressbook-sync?_task=&_action=)

Die Fehlermeldung ist bei allen Adressbüchern und allen Kontakten identisch:
  • DB Error: [7] ERROR: duplicate key value violates unique constraint "carddav_contacts_pkey"
  • DETAIL: Key (carddav_server_id, user_id, vcard_id)=...... already exists
  • /volume1/@appstore/MailStation/roundcubemail/program/lib/Roundcube/rcube_db.php on line 467 (POST /mail/?_task=addressbook&_action=plugin.carddav-addressbook-sync?_task=&_action=)


Gruß
luddi


*EDIT:
Ach übrigens der Inhalt des 'CardDAV' log files...

Rich (BBCode):
#Owncloud Test Adressbuch
Starting CardDAV-Addressbook synchronization
Connected to the CardDAV-Server https://xxxxxxx.de/owncloud/remote.php/carddav/addressbooks/user2000/contacts
CardDAV-Server XML-Response is malformed. Synchronization aborted!

#Baikal Test Adressbuch
Starting CardDAV-Addressbook synchronization
Connected to the CardDAV-Server https://10.88.66.2/baikal/card.php/addressbooks/luddi/default/
Couldn't add CardDAV-Contact to the local database with the vCard id 50c7545a-c3a4-4a65-bc73-9bd92b037e99
all CardDAV-Data are synchronous, nothing todo!
Syncronization complete!

#Owncloud Standard Adressbuch
Starting CardDAV-Addressbook synchronization
Connected to the CardDAV-Server https://xxxxxxx.de/owncloud/remote.php/carddav/addressbooks/luddi/contacts
Couldn't add CardDAV-Contact to the local database with the vCard id 7a9ed97b-16ae-42ef-9dfc-4ddc3cbeb25e
Couldn't add CardDAV-Contact to the local database with the vCard id 34f8463b-aa09-4fb2-bd0e-554efb890778
Couldn't add CardDAV-Contact to the local database with the vCard id 6cc7703f-e8ca-4674-bdb0-cdfc5971d96b
Couldn't add CardDAV-Contact to the local database with the vCard id 304eaf44-8809-4230-bdc1-d4d43064f948
:
:
usw...

Hier bekommt man entweder den Fehler "XML-Response is malformed. Synchronization aborted!" oder "Couldn't add CardDAV-Contact to the local database".
 
Zuletzt bearbeitet:

obimichael

Benutzer
Mitglied seit
28. Nov 2014
Beiträge
6
Punkte für Reaktionen
0
Punkte
0
Nachdem update der MailStation war das CardDav Plugin wieder verschwunden, hab es jetzt nochmal installiert und gleich mal versucht mit Postgre zu schauen, ob Daten in den Tabellen sind. Hab davor noch die Felder mit Länge 64 auf 255 hochgesetzt, damit der Fehler bezügl. der Zeichenlänge verschwindet, und das passt soweit ...

Code:
/usr/syno/pgsql/bin/psql -U roundcube roundcubemail

und dann schauen, wieviele Einträge es gibt ...

Code:
roundcubemail=> select count(*) from carddav_contacts;

und es sind alle Kontakte in der Tabelle.

Code:
\q
Um pqsql wieder zu verlassen :)


@luddi
Wenn er jetzt beim synchronisieren versucht die Kontakte nochmals einzufügen und es gibt sie schon, dann wird der Fehler ausgegeben. Ist nicht schön, aber ist an und für sich kein Problem. Müßte man nur schauen, wie er mit gelöschten Kontakten umgeht.

Kontakte sind jetzt in der DB, aber sie werden nicht angezeigt.
Michael
 
Zuletzt bearbeitet:

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Danke für den Hinweis. Ich habe nun bei mir auch alle zählen lassen und die pqsql gibt mir in Summe 320 Kontakte aus. Jedoch gibt es in Summe der bei mir 3 angelegten Adressbücher (1, 1, 159) 161 Kontakte. Somit ist es jedenfalls für mich plausibel denn die 'carddav_server_id' ist bei mir schon bei 10. das heißt aktuell werden die ID´s 8, 9 und 10 verwendet. Es kann durchaus sein dass beim Löschen eines CardDAV Adressbuchs deren Kontakte immer noch in der pqsql herum geistern...

Kontakte sind jetzt in der DB, aber sie werden nicht angezeigt.
Das ist leider das Problem dass sie nicht angezeigt werden :(

Gruß
luddi
 

mabox

Benutzer
Mitglied seit
10. Jul 2013
Beiträge
192
Punkte für Reaktionen
12
Punkte
24
Hi,
ich habe auch mal wieder ein wenig rumprobiert. Leider kann ich auch nichts neues berichten.
Nach dem letzten Update der Mailstation war das carddav Plugin auch wieder verschwunden. Dann habe ich es nach der Anleitung wieder installiert und alles konfiguriert. Alles verhält sich unverändert. Es hat den Anschein als werden die Kontakte importiert. Danach werden sie aber im Adressbuch nicht angezeigt.
Im Carddav Log habe ich folgendes:
Rich (BBCode):
[19-Dec-2014 20:54:04 +0100]: v0.5.1 |  carddav_server_id: 15 | Starting CardDAV-Addressbook synchronization
[19-Dec-2014 20:54:05 +0100]: v0.5.1 |  carddav_server_id: 15 | Connected to the CardDAV-Server https://xxxxxxx/addressbooks/users/mabo/addressbook/
[19-Dec-2014 20:54:05 +0100]: v0.5.1 |  carddav_server_id: 15 | CardDAV-Server XML-Response is malformed. Synchronization aborted!

Im Error Log steht nichts.

Also alles unverändert, echt schade........war so top als das noch funktionierte..... was nun? Warten bis Synology das endlich mal von Haus aus einbaut?
Ich melde es mal an den Synology Support als Wunsch. Hatte erst Kontakt mit denen und der Supporter meinte an diese Adresse könnte man Wünsche und Verbesserungen melden:

".....gerne können Sie Anregungen und Wünsche an unsere entsprechende Fachabteilung senden. Sie finden das entsprechende Formular unter:
https://originwww.synology.com/de-de/form/inquiry/feedback ......"

Vielleicht sollten wir da alle mal den Wunsch äußern das Carddav Plugin per Standard in die MailStation/Roundcube zu integrieren....... vielleicht bringt es irgendwann mal was.
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Vielleicht sollten wir da alle mal den Wunsch äußern das Carddav Plugin per Standard in die MailStation/Roundcube zu integrieren....... vielleicht bringt es irgendwann mal was.

Hi mabox, danke auch dir für deine detektivische Arbeit hierzu. Ich bin deiner Aufforderung nachgekommen und habe soeben mein Beitrag dazu geleistet und Synology gegenüber mein Wunsch nach einem CardDAV Plugin geäußert.

Gruß
luddi
 

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
I made an install package for the RoundCubeMail CardDAV plugin of Benjamin "blind-coder" Schieder.
No manual file edits, no database commands, just install and run.

Currently in BETA, see CardDAV for Synology Mail Station for the SPK file and some more info.

You can give it a try if you want, works fine with Baïkal CardDAV on my DSM 5.0 :)
If you do, please report your findings here.

Best regards,
Erik.
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Hi Erik,

nice to hear from you!

I have read the description and feature list of the CardDAV plugin "mailstation_CardDAV-0.9.0.spk" distributed on sourceforge yesterday evening until you have published the information. It sounds very promising and I wanted to give it a chance. But yesterday evening it was definitively too late to install and configure the package.

Today, well rested I give it a try and installed the package on the System. During the installation process you have to decide which CardDAV server you are intended to use. You can choose Synology, Baikal, owncloud and other (by specific URL). I checked "owncloud" because in my environment is running an owncloud server.
After the installation succeeded I logged in into the roundcoube MailStation and clicked the "Settings" button. Inside the settings there appeared a CardDAV section to specify the server URL and the user credentials. After saving the settings another configuration block appeared to configure another CardDAV Server. That´s pretty nice that the plugin support more than one CardDAV address book.
After the configuration was finished I checked the address book inside the Mail Station and it seems to work. :)

I tested the plugin with the following system environment:
DSM 5.0-4528 Update 2
Mail Station ver. 20141204-0215 (integrated Roundcube Webmail 1.0.2)
owncloud 7.0.4


Thanks a lot for providing the spk package, Erik!

Best regards,
luddi
 
Zuletzt bearbeitet:

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
You needed to change the predefined ownCloud URL?
If so, into what?
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
No, I didn´t changed it. Why are you asking? I´m a little bit confused...

I only choosed "owncloud" during installation. But I have observed one issue during installing the package on my second system.
After choosing server type and confirm it appeared an error message (attached screenshot) but the package shows the status "running". But when trying to login into the MailStation nothing happened and the site didn´t load.
I decided to uninstall the package and reinstall it again. Now the installation succeeded and the MailStation becomes available again.
Now it works fine on my default system wich is running the MailServer and MailStation.

error_carddav_mailstation_plugin.png

Best regards,
luddi
 

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
After the installation succeeded I logged in into the roundcoube MailStation and clicked the "Settings" button. Inside the settings there appeared a CardDAV section to specify the server URL and the user credentials. After saving the settings another configuration block appeared to configure another CardDAV Server.

No, I didn´t changed it. Why are you asking? I´m a little bit confused...

In Roundcube, you should be able to go directly to Addressbook and see the CardDAV book. No need to go to Settings first.
So I thought maybe you needed to change something for ownCloud, appearently not :)

/Erik
 
Zuletzt bearbeitet:

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
After choosing server type and confirm it appeared an error message (attached screenshot) but the package shows the status "running". But when trying to login into the MailStation nothing happened and the site didn´t load.
I decided to uninstall the package and reinstall it again. Now the installation succeeded and the MailStation becomes available again.
Now it works fine on my default system wich is running the MailServer and MailStation.

Maybe this second system had some CardDAV tables in the Roundcube database already, from your previous attempts with Christian Putzke's plugin?
Deinstall removed those tables (assuming you have chosen for that), so subsequent Install succeeded.

Unfortunately, Package Center keeps the package in the Installed list, even though installation has failed. This can be confusing, not sure if I can make a workaround for that.

/Erik
 
Zuletzt bearbeitet:

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
In Roundcube, you should be able to go directly to Addressbook and see the CardDAV book. No need to go to Settings first.
So I thought maybe you needed to change something for ownCloud, appearently not :)

/Erik
Ok, now I understand what you have meant before. Sorry for those misunderstanding. I will shortly explain the installation process what I have experienced.

First, during the installation you have to choose the addreessbok location - I have chosen "owncloud".

carddav_plugin_install_choose_type.png

After the installation has finished and I logged in into roundcoube there didn´t appear any CardDAV book by default in the Addressbook section. Only the internal default addressbook was available as before, though the owncloud server is running on localhost and located on '/volume1/web/owncloud'.

Therefore I had to specify manually the CardDAV addressbook at "settings - CardDAV".

carddav_add_new_addressbook.png

In the field "URL" I have specified the link that provided from owncloud in the addressbook settings section.

owncloud_carddav_link.png

The CardDAV link is as follows:
https://<MY_DOMAIN>/owncloud/remote.php/carddav/addressbooks/<USER>/contacts

But only after adding the new addressbook it appeared in the addressbook section.
I don´t know how I had to specify the addressbook myself and you are not... :confused:

Regards,
luddi
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
Maybe this second system had some CardDAV tables in the Roundcube database already, from your previous attempts with Christian Putzke's plugin?
I´m not pretty sure, but it could be the reason for that behavior.

...not sure if I can make a workaround for that.
Would be nice but not really mandatory from my point of view! :) General the plugin works fine and the addressbook is connected and integrated into the Mail Station.

Best regards,
luddi
 

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
Could you please deinstall + remove data, then install again as "Other CardDAV server" with URL="'https://localhost/owncloud/remote.php/carddav/addressbooks/%u/contacts" (without quotes).
Maybe the addressbook does show up automagically now (i.e. without having to add it in Settings) ?

/Erik
 

luddi

Benutzer
Sehr erfahren
Mitglied seit
05. Sep 2012
Beiträge
3.242
Punkte für Reaktionen
586
Punkte
174
I could try it... but then I would know which addressbook is chosen by default when the owncloud server have more than one user? Is it controlled by the parameter %u ???

luddi
 
Status
Für weitere Antworten geschlossen.
 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat