Results 1 to 7 of 7

Thread: iPhone + CardDAV to access GAL on ZCS 7.1.3 OSE

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    4

    Default [SOLVED] iPhone + CardDAV to access GAL on ZCS 7.1.3 OSE

    I have searched but cannot find what I'm looking for.

    I have Zimbra 7.1.3 OSE running and can setup an iPhone to access personal email via IMAP, personal and shared calendars via CalDAV and personal contacts through CardDAV.

    What I don't know is how to setup CardDAV to access the global address list so when iPhone users create a new email, the "TO" button will populate with everyone on the Zimbra server (via the GAL).

    Do I need to login with the admin account and grant access to the GAL to an in-between user and then have everyone add the CardDAV for that in-between user?

    For those curious, the following is how I setup an iPhone

    to access personal emails:
    1. Click the Settings icon
    2. Select Mail, Contacts, Calendars, Add Account..., Other, Add Mail Account
    3. Set the following and click Next:
      Name: John Doe
      Address: JDoe@mydomain.com
      Password: ******
      Description: JDoe @ mydomain
    4. Select IMAP, set the following and click Next, Finish
      Incoming Hostname: mail.mydomain.com
      Incoming User Name: JDoe
      Incoming Password: *****
      Outgoing Hostname: mail.mydomain.com
      Outgoing User Name: JDoe
      Outgoing Password: *****


    to access personal calendars:
    1. Click the Settings icon
    2. Select Mail, Contacts, Calendars, Add Account..., Other, Add CalDAV Account
    3. Set the following and click Next:
      Server: mail.mydomain.com
      User Name: JDoe
      Password: ******
      Description: CalDAV @ mydomain


    to access personal contacts:
    1. Click the Settings icon
    2. Select Mail, Contacts, Calendars, Add Account..., Other, Add CardDAV Account
    3. Set the following and click Next:
      Server: mail.mydomain.com
      User Name: JDoe
      Password: ******
      Description: CardDAV @ mydomain


    Any help would be appreciated.
    Thanks,
    LHammonds
    Last edited by LHammonds; 10-28-2011 at 04:15 PM.

  2. #2
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    You could possibly access the GAL through LDAP, but only if you have success setting up access using secure LDAP. Not a good idea to expose your directory to snoops.

    What you could try is to share your galsync account's _internalGAL to a user account read-only using ZWC, and then mount it in that account, again using ZWC. Note: I haven't tested this myself extensively, let alone with iPhone. But I believe that iOS, unlike Mac OS 10.7, can display multiple CardDAV address books.

  3. #3
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    4

    Default

    Quote Originally Posted by ewilen View Post
    What you could try is to share your galsync account's _internalGAL to a user account read-only using ZWC, and then mount it in that account, again using ZWC. Note: I haven't tested this myself extensively, let alone with iPhone.
    Thanks for the suggestion. I will give it a whirl after I rebuild the server (currently testing space increase procedures and determining best partition setup scheme).

    Quote Originally Posted by ewilen View Post
    But I believe that iOS, unlike Mac OS 10.7, can display multiple CardDAV address books.
    I can confirm that the iPhone has no problem with multiple CardDAV and CalDAV accounts as they are integrated seamlessly. I tested that by setting up two accounts and then added both via IMAP, CardDAV and CalDAV. I was able to get a nicely blended listing of emails in both accounts (or one at a time if I chose), a nicely blended listing of contacts and calendars (including shared calendars in the account).

    Thanks,
    LHammonds

  4. #4
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    Ah, here we're not talking about multiple accounts, but multiple address books within a single account, equivalent to multiple calendars in a single account.

    If you share either one from one account to another, and then mount it in the second account, then the mounted item should be exposed via CalDAV/CardDAV.

    (In fact if you share a mail folder and mount it, it'll be exposed via IMAP.)

  5. #5
    Join Date
    May 2009
    Posts
    33
    Rep Power
    6

    Default

    Use the Exchange connection on the iPhone to access the GAL... you can turn off the mail and calendars so it only has the contacts (GAL)...

    CardDav will only give you the contacts in your address book not a shared one.

    To Setup the Exchange connection on the iPhone

    Settings > Mail, Contacts ,Calendars > Add Account > Microsoft Exchange

    Email: myemail@address
    Domain: MyDomain.com
    Username: myusername@MyDomain.com <---- This bit is needed you cannot use just uername
    Password: mypassword

    Description: GAL

    Click Next

    Mail Server: MyFQDNofMyMailServer.com

    Now Click Save..

    Turn off Mail <--- no point as it will not support shared folders
    Turn off Cal <---- ditto

    Make sure you take advantage of the mobile sync options in Zimbra for remote wipe and force pin...

    Hope this helps
    Last edited by Guest; 10-27-2011 at 10:35 AM. Reason: Extra info

  6. #6
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    Quote Originally Posted by Guest View Post
    Use the Exchange connection on the iPhone to access the GAL... you can turn off the mail and calendars so it only has the contacts (GAL)...
    This is what I would suggest to NE users, but LHammonds is using FOSS.

  7. #7
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    4

    Default

    I have the administrator's "_InternalGAL" folder listed in the "Shared by me" under the Sharing section of the Preference tab in ZWC.

    I forgot the process in which I shared it but it is there.

    I created a new mailbox account. I login with the new account in the ZWC, click Preferences, Sharing and type "administrator" in the "Show folders shared with me by the following user:" box. I then click "Accept" when I see the _InternalGAL folder.

    I now click on the Address Book tab which shows the following folders:

    Contacts
    Emailed Contacts
    Trash
    administrator's _InternalGAL

    If I click on the _InternalGAL folder, I can see a list of all users defined in the system.

    I now add this account to my iPhone as described in the 1st post by adding IMAP, CalDAV and CardDAV.

    When I look at contacts, I only see "Contacts" and "Emailed Contacts" and cannot see the global address list.

    If I add the CardDAV of the administrator account, I see the following entries:

    _ActiveDirectoryGAL
    _InternalGAL
    Contacts
    Emailed Contacts

    When looking at all those contacts, I can see all internal users and even the Windows Active Directory users.

    I need to do some more research...I know I saw some documentation somewhere talking about mounting shares via the command-line which may help me with this a bit more.

    As I find resources related to this, I'm going to add them to this list:


    EDIT:
    Quote Originally Posted by Guest View Post
    Use the Exchange connection on the iPhone to access the GAL... you can turn off the mail and calendars so it only has the contacts (GAL)...
    I'll investigate this option. Thanks.

    EDIT: I get "unable to verify account information" which is probably par for the course when using the OSE version.

    Quote Originally Posted by Guest View Post
    CardDav will only give you the contacts in your address book not a shared one.
    Upon initial testing, that seems to be the case...unless the _InternalGAL is a special scenario.

    I just tested the CalDAV sharing where I included a couple of conference rooms shared calendars and those show up and are visible on the iPhone immediately.

    I'll test the ordinary contacts sharing the same way to see if the _InternalGAL is just handled differently.

    EDIT: The normal sharing of a contact folder did not work...at least not the same way sharing of calendars work.

    -------------------------------------------------------
    -------------------------------------------------------
    -------------------------------------------------------

    If sharing does not work for CardDAV (e.g. iPhone cannot access it like it can with shared calendars in CalDAV), my next option might be to create a generic account called "AddressList" and then create a script that will export all users and distribution lists in the _InternalGAL and import them into the Contacts folder of the "AddressList" user. Then have instructions for all my iPhone users to add an additional CardDAV account called "AddressList" which should pull the contacts and distribution lists in that user's list...which is a copy of the GAL.

    I think an individual backup / restore script would do the trick. Basically backing up administrators _InternalGAL and restoring to AddressList's "contact" folder. I'll need to research and test this out:

    Code:
    /opt/zimbra/bin/zmmailbox -z -m administrator@mydomain.com getRestURL "/_InternalGAL?fmt=tgz" > /tmp/internalgal.tgz
    /opt/zimbra/bin/zmmailbox -z -m addresslist@mydomain.com postRestURL "/Contacts?fmt=tgz&resolve=reset" /tmp/internalgal.tgz
    Ok, the above worked in that I got the contacts into the addresslist account, however, they went into Contacts/_InternalGAL as a sub-folder. Seems that the iPhone doesn't like sub-folders either. So I need to figure out how to dump the contents of the _InternalGAL in the backup archive directly into the root of the Contacts folder.

    hhmmm...researching...

    EDIT: SUCCESS!

    It is not quite as simple as the above backup / restore but I was able to figure out what had to be done in order to make it work. Now when I go to create an email on the iPhone, clicking the + sign shows all of my personal contacts as well as the global address list which is contained in the "AddressList" account...which is a copy of the InternalGAL.

    Now all I need to do is to figure out how to script everything and put it on a cron schedule...probably just once per day...or even every hour.

    I'm still confused as to why CardDAV refuses to show the contents of a shared folder. It works perfectly for CalDAV (creating events on both sides)

    EDIT: Solution incorporated into this thread

    LHammonds
    Last edited by LHammonds; 11-18-2011 at 11:22 AM.
    Type su - zimbra -c "zmcontrol -v" to get your version and copy that into your profile (more info here)

Similar Threads

  1. Calendar scheduler on 7.1.3 ZCS
    By soba@ukw.edu.pl in forum Administrators
    Replies: 0
    Last Post: 10-01-2011, 08:30 AM
  2. Zimbra Internal GAL ZCS OSS 5.0.14
    By mohamedsafeek.s in forum Administrators
    Replies: 0
    Last Post: 06-03-2011, 02:46 AM
  3. Trouble Sending mail - All Messages deferred!
    By SiteDiscovery in forum Administrators
    Replies: 7
    Last Post: 09-03-2009, 05:52 AM
  4. Access (and success) to ZCS 5.0.2
    By eMHa in forum Administrators
    Replies: 3
    Last Post: 11-04-2008, 01:20 PM
  5. ZCS 3.2 Beta Available
    By KevinH in forum Announcements
    Replies: 31
    Last Post: 07-07-2006, 04:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •