Re: [SOGo] Uploading an addressbook with curl?
Can you try with "text/x-vcard; charset=utf-8" instead ? W. -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
* Wolfgang Sourdeau : > >The server still reports: > > > >127.0.0.1 - - [30/Mar/2011:22:17:02 GMT] "POST > >/SOGo/dav/t...@state-of-mind.de/Contacts/personal/ HTTP/1.1" 500 36/328 > >0.023 - - 0 > > > >The URL is correct, yes? > Yep > >If it is I don't see what I could change right now. Anything I can to do > >increase log verbosity on the server (sogo) side? > > > >p@rick > > > Do you see any message in the SOGo log? A 500 could indicate that a > crash occurred Unfortunately not. I don't see anything else but the log line I posted above which indicates an internal server error. Anything I could do to increase verbosity? p@rick -- state of mind Digitale Kommunikation http://www.state-of-mind.de Franziskanerstraße 15 Telefon +49 89 3090 4664 81669 München Telefax +49 89 3090 4666 Amtsgericht MünchenPartnerschaftsregister PR 563 -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
The server still reports: 127.0.0.1 - - [30/Mar/2011:22:17:02 GMT] "POST /SOGo/dav/t...@state-of-mind.de/Contacts/personal/ HTTP/1.1" 500 36/328 0.023 - - 0 The URL is correct, yes? Yep If it is I don't see what I could change right now. Anything I can to do increase log verbosity on the server (sogo) side? p@rick Do you see any message in the SOGo log? A 500 could indicate that a crash occurred W> -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
* Wolfgang Sourdeau : > >>I found a script that converts LDIF to vCard and created a vcard > >>file, but my > >>curl call fails: > >> > >>curl -X POST -u t...@example.com -v -d @adressbook.vcf > >>https://mail.example.com/SOGo/dav/t...@example.com/Contacts/personal/ > >> > >>sogo.log reports: > >> > >>127.0.0.1 - - [30/Mar/2011:21:33:06 GMT] "POST > >>/SOGo/dav/t...@example.com/Contacts/personal/ HTTP/1.1" 500 > >>36/347 0.023 - - 0 > >> > >>Wrong ressource? > >> > >> > >Ah. Maybe it's because it does not specify a "content-type". If > >you can specify it, the right value would be "text/x-vcard". > > > > > > > I guess you could use -H "Content-Type: text/x-vcard" as cmdline > parameters... Thanks. Just had figured that out when I read our post. Additionally I had to send a valid User-Agent, since SOGo would refuse to accept curl as valid client. This is where I currently stand, but still fail: curl -H "Content-Type: text/x-vcard" -A "Mozilla/5.0" \ -X POST -u "t...@state-of-mind.de" -v -w content_type \ -d @abook.vcf https://mail.state-of-mind.de/SOGo/dav/t...@state-of-mind.de/Contacts/personal/ The communication goes like this (> is the client, < is the server): > User-Agent: Mozilla/5.0 > Host: mail.state-of-mind.de > Accept: */* > Content-Type: text/x-vcard > Content-Length: 328 > < HTTP/1.1 500 Request failed < Date: Wed, 30 Mar 2011 20:28:31 GMT < content-length: 36 < Via: 1.1 mail.state-of-mind.de < Connection: close < Content-Type: text/plain < * Closing connection #0 * SSLv3, TLS alert, Client hello (1): the called object returned no result The server still reports: 127.0.0.1 - - [30/Mar/2011:22:17:02 GMT] "POST /SOGo/dav/t...@state-of-mind.de/Contacts/personal/ HTTP/1.1" 500 36/328 0.023 - - 0 The URL is correct, yes? If it is I don't see what I could change right now. Anything I can to do increase log verbosity on the server (sogo) side? p@rick -- state of mind Digitale Kommunikation http://www.state-of-mind.de Franziskanerstraße 15 Telefon +49 89 3090 4664 81669 München Telefax +49 89 3090 4666 Amtsgericht MünchenPartnerschaftsregister PR 563 -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
I found a script that converts LDIF to vCard and created a vcard file, but my curl call fails: curl -X POST -u t...@example.com -v -d @adressbook.vcf https://mail.example.com/SOGo/dav/t...@example.com/Contacts/personal/ sogo.log reports: 127.0.0.1 - - [30/Mar/2011:21:33:06 GMT] "POST /SOGo/dav/t...@example.com/Contacts/personal/ HTTP/1.1" 500 36/347 0.023 - - 0 Wrong ressource? Ah. Maybe it's because it does not specify a "content-type". If you can specify it, the right value would be "text/x-vcard". I guess you could use -H "Content-Type: text/x-vcard" as cmdline parameters... -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
I found a script that converts LDIF to vCard and created a vcard file, but my curl call fails: curl -X POST -u t...@example.com -v -d @adressbook.vcf https://mail.example.com/SOGo/dav/t...@example.com/Contacts/personal/ sogo.log reports: 127.0.0.1 - - [30/Mar/2011:21:33:06 GMT] "POST /SOGo/dav/t...@example.com/Contacts/personal/ HTTP/1.1" 500 36/347 0.023 - - 0 Wrong ressource? Ah. Maybe it's because it does not specify a "content-type". If you can specify it, the right value would be "text/x-vcard". -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
Hi Wolfgang, * Wolfgang Sourdeau : > Le 11-03-30 15:12, Patrick Ben Koetter a écrit : > >I need to import 50 adressbook in LDIF format and I thought I'd use curl to > >do > >a POST to the adressbook URL. But it seems (my naive interpretation) I get > >the > >URL wrong: > > The DAV addressbooks do not support LDIF importation. You need to > use the web interface for this or to create a script that will > translate the LDIF entries to vcards... I found a script that converts LDIF to vCard and created a vcard file, but my curl call fails: curl -X POST -u t...@example.com -v -d @adressbook.vcf https://mail.example.com/SOGo/dav/t...@example.com/Contacts/personal/ sogo.log reports: 127.0.0.1 - - [30/Mar/2011:21:33:06 GMT] "POST /SOGo/dav/t...@example.com/Contacts/personal/ HTTP/1.1" 500 36/347 0.023 - - 0 Wrong ressource? TIA, p@rick -- state of mind Digitale Kommunikation http://www.state-of-mind.de Franziskanerstraße 15 Telefon +49 89 3090 4664 81669 München Telefax +49 89 3090 4666 Amtsgericht MünchenPartnerschaftsregister PR 563 -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Uploading an addressbook with curl?
Le 11-03-30 15:12, Patrick Ben Koetter a écrit : I need to import 50 adressbook in LDIF format and I thought I'd use curl to do a POST to the adressbook URL. But it seems (my naive interpretation) I get the URL wrong: Hi Patrick, The DAV addressbooks do not support LDIF importation. You need to use the web interface for this or to create a script that will translate the LDIF entries to vcards... Cheers, Wolfgang -- users@sogo.nu https://inverse.ca/sogo/lists
[SOGo] Uploading an addressbook with curl?
I need to import 50 adressbook in LDIF format and I thought I'd use curl to do a POST to the adressbook URL. But it seems (my naive interpretation) I get the URL wrong: % curl -v -X POST -u t...@example.com -d @adressbook.ldif https://mail.example.com/SOGo/dav/t...@example.com/Contacts/personal/ Enter host password for user 't...@example.com': * About to connect() to mail.example.com port 443 (#0) * Trying 194.126.158.26... connected * Connected to mail.example.com (194.126.158.26) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server key exchange (12): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using DHE-RSA-AES256-SHA ... *SSL certificate verify ok. * Server auth using Basic with user 't...@example.com' > POST /SOGo/dav/t...@example.com/Contacts/personal/ HTTP/1.1 > Authorization: Basic dGVzdEBzdGF0ZS1vZi1taW5kLmRlOnQzc3Qhbmc= > User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k > zlib/1.2.3.3 libidn/1.15 > Host: mail.example.com > Accept: */* > Content-Length: 31468 > Content-Type: application/x-www-form-urlencoded > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 500 Request failed < Date: Wed, 30 Mar 2011 19:06:43 GMT < content-length: 36 < Via: 1.1 mail.example.com < Connection: close < Content-Type: text/plain < * Closing connection #0 * SSLv3, TLS alert, Client hello (1): Is it the URL? Any hint toward the right direction greatly apprechiated. p@ -- state of mind Digitale Kommunikation http://www.state-of-mind.de Franziskanerstraße 15 Telefon +49 89 3090 4664 81669 München Telefax +49 89 3090 4666 Amtsgericht MünchenPartnerschaftsregister PR 563 -- users@sogo.nu https://inverse.ca/sogo/lists