I am attempting to import each user's calendar (ics format) into Zimbra using REST. I need to be able to import each user's calendar as the Zimbra admin user since I do not know each user's password. I have authorized the admin user to have read/write access to each user's account:
Code:
zmmailbox -z -m user1 mfg /Calendar account admin@zimbra.mydomain.com rw
I then try to import the calendar via REST, but I receive an "ics formatter failure" error:
Code:
curl -v -u admin@zimbra.mydomain.com:mypassword --upload-file user1.ics http://zimbra.mydomain.com/service/home/user1/calendar?fmt=ics
Error:
Code:
* About to connect() to zimbra port 80 (#0)
* Trying xxx.xxx.xxx.xxx... connected
* Connected to zimbra (xxx.xxx.xxx.xxx) port 80 (#0)
* Server auth using Basic with user 'admin@zimbra.mydomain.com'
> PUT /service/home/user1/calendar?fmt=ics HTTP/1.1
> Authorization: Basic xxxxxxxxxxx
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: zimbra
> Accept: */*
> Content-Length: 2241
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 500 system failure: ics formatter failure
< Date: Tue, 28 Dec 2010 15:32:51 GMT
< Content-Length: 0
<
* Connection #0 to host zimbra left intact
* Closing connection #0
However, if I run the exact same command only changing the calendar to the admin's calendar (changed part in bold below), the same ics file imports just fine:
Code:
curl -v -u admin@zimbra.mydomain.com:mypassword --upload-file user1.ics http://zimbra/service/home/admin/calendar?fmt=ics
* About to connect() to zimbra port 80 (#0)
* Trying xxx.xxx.xxx.xxx... connected
* Connected to zimbra (xxx.xxx.xxx.xxx) port 80 (#0)
* Server auth using Basic with user 'admin@zimbra.mydomain.com'
> PUT /service/home/admin/calendar?fmt=ics HTTP/1.1
> Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: zimbra
> Accept: */*
> Content-Length: 2241
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Date: Tue, 28 Dec 2010 15:08:08 GMT
< Content-Length: 0
<
* Connection #0 to host zimbra left intact
* Closing connection #0
Because of this I know that my ics file is valid (I also ran it through the
iCalendar Validator) and this appears to be a problem with Zimbra. It seems that the admin user should be able to post this calendar to the user's account since I gave it read/write access. Any ideas on why this is not working or another way to go about importing these calendars?
Thanks!