Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Auto-provisioning calendar data/shared calendars

  1. #11
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default Zimbra/Moodle integration is in production now

    Two slightly different solutions for two slightly different use cases.

    1) The general "Residential Calendar" and "Academic Calendar"

    These calendars are and will continue to be maintained in a non-Zimbra content management system. We (i.e., Matt Bockol, not me) wrote some code to make a proper iCal feed out of it. We created a "web services group calendars" resource account that subscribes to the feed via iCal, set up a cron job to refresh that iCal feed periodically, and then re-share that calendar with everyone. Upon account creation, we mount the two public calendars at /Residential Calendar and /Academic Calendar using zmmailbox (see schemers' posts above). This is a lot faster than subscribing each individual user to the iCal feed.

    2) Course schedules and Moodle one-offs

    We chose to feed course schedule data into our Moodle LMS, and re-export it from there as a single iCal feed, not one feed (or share) per course. This required a moderate amount of coding, all external to Zimbra, to munge our student registration data and beat the alpha-quality iCal support in the latest version of Moodle into shape, but it's done now, and the code could be made available to other institutions on request.

    We created two new Moodle REST URLs:

    2a) List all users on the Moodle system (since not every Zimbra user is a Moodle user)

    2b) Accepts two arguments: username and a sha1(secret key+username) digital signature (which along with source IP address serves as authentication, and discourages user A from stealing user B's iCal feed). Returns that user's iCal feed.

    All users are subscribed to their own personal Moodle calendars URL, including the sha1 signature. The initial load of about 2,200 users' calendars took 7 hours. Incremental updates take about a half hour. We plan to refresh course schedules and force reload of the iCal feeds (see responses from Zimbra employees above) on a nightly basis.

    We have just one problem with this system -- next post.

  2. #12
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default zmmailbox folder name conflict -- how to unset folder URL?

    Our calendar provisioning code boils down to:

    Code:
    my $add_command = "zmmailbox -z -m " . $user . " cf --view appointment --color cyan --flags \"b#\" \"/Moodle\""; 
    
    my $urlset_command = "zmmailbox -z -m " . $user . " mfu \"/Moodle\" \"$cal_url\"";
    
    my $sync_command = "zmmailbox -z -m " . $user . " syncFolder \"/Moodle\"";
    Problem: At first, we did not properly check the return code/output of $add_command. We have five users who had a top-level *email* folder named Moodle. Those folders are now in a state where neither the iCal feed nor the emails previously in those folders are accessible. How can we fix them? zmmailbox mfu doesn't seem to let you unset the URL.

  3. #13
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    20

    Default

    hm, can't set the modifyFolderURL back to what it was? (try this on a test account because I would hate to have you loose mail in those folders) plus you might need to change the defaultView/foldertype so that you could go into the mail app to actually check if everything's showing up fine. Then instead of rename, transfer/copy the mail to a new folder/possibly grab it out to a .zip with rest. (transfer/copy instead of rename just so your sure there's no quirks leftover.) then delete the offending folder.
    Last edited by mmorse; 11-07-2007 at 05:38 PM.

  4. #14
    hchan is offline Active Member
    Join Date
    Sep 2007
    Posts
    37
    Rep Power
    7

    Default

    re: automating icalendar share reload

    I'm reading through this thread and am still not clear on how to automate the reload for a calendar share that I'm bringing in from an outside ics. Right now, I'm manually going in and reloading the calendars but having been burned by an event that didn't show up because of a missed manual reload, I'd like to get very clear on how to automate this.

    Or has this been fixed yet? I'm currently using the Network Edition version 5.0.4 soon to be 5.0.5...

    Thanks.

  5. #15
    webman's Avatar
    webman is offline Special Member
    Join Date
    Oct 2007
    Location
    North East England
    Posts
    167
    Rep Power
    7

    Default

    Is there any detailed documentation on the --view and --flags parameters used by zmmailbox? I can't seem to find out what they are/do. Thanks

  6. #16
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default

    There still is no server support for auto-refreshing feeds, but you can make a cron job. The command line to refresh the "Feed" folder for user@example.com is zmmailbox -z -m user@example.com syncFolder /Feed. RSS and iCal are the same.

    For user-specific provisioned calendars, we sync all users (enumerate with zmprov gaa example.com) hourly; for more stable holiday and academic schedule calendars, we sync daily into an account that shares several calendars with all users.

    --view is self-correcting:

    mbox foo@example.com> cf --view bogus /that
    ERROR: zclient.CLIENT_ERROR (invalid view: bogus, valid values: [appointment, contact, conversation, document, message, wiki, task, voice])

    --flags, I'm not sure. For calendars, --flags '#' means the calendar will be selected, i.e., show/hide checkbox checked.

  7. #17
    hchan is offline Active Member
    Join Date
    Sep 2007
    Posts
    37
    Rep Power
    7

    Default

    re: cron job to automatically reload a calendar feed

    Ok, so if I'm understanding this correctly, if I have a user, e.g. user@example.com on my system who is receiving an iCal feed from outside and is sharing to a group of internal users, all I need to do to get up to date data to the internal group is to put the following into a crontab (as the "zimbra" user)?

    zmmailbox -z -m user@example.com syncFolder /Feed

    Thanks in advance. I just wanted to be absolutely clear on what I have to do.

  8. #18
    hchan is offline Active Member
    Join Date
    Sep 2007
    Posts
    37
    Rep Power
    7

    Default

    FWIW, when I used the zmmailbox command above in a crontab to handle 5 different iCal feeds, I caused the system to fail when I increased the frequency to once very 10 minutes.

    Is there any update on when iCal feed refreshes can be done in a cleaner way? Any suggestions on how to better do the zmmailbox crontab method?

    Thanks.

  9. #19
    holbor is offline Member
    Join Date
    Jan 2008
    Location
    Ashland, Oregon
    Posts
    14
    Rep Power
    7

    Default FWIW - cron and zmmailbox

    Posting just in case someone else has this problem, or I forget how I solved it.

    I'd been trying this for a while with no success, the command ran fine from the command line, but in cron it just did not work. No errors, just did not refresh the calendar.

    Original crontab:
    05,20,35,50 * * * * zmmailbox -a admin@zimbra.site.org -p pfffte -m wiki@zimbra.site.org syncFolder "/TicketSystem"

    Working crontab:
    05,20,35,50 * * * * bash -l zmmailbox -a admin@zimbra.site.org -p pfffte -m wiki@zimbra.site.org syncFolder "/TicketSystem"

    For some reason zmmailbox needed a login shell. Evironment vars??

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. error in calendar resource Auto acceptdecline FALSE
    By kmuralidharan in forum Users
    Replies: 2
    Last Post: 07-10-2007, 08:35 AM
  2. Auto timezone problem in calendar
    By kdunphy in forum Administrators
    Replies: 8
    Last Post: 03-19-2007, 05:54 PM
  3. Outlook/Zimbra Private Appointments Issue
    By Smurthey in forum Zimbra Connector for Outlook
    Replies: 0
    Last Post: 03-09-2007, 07:29 AM
  4. Replies: 0
    Last Post: 10-04-2006, 06:09 AM
  5. M2 Experiences?
    By jordandeamattson in forum Users
    Replies: 17
    Last Post: 11-22-2005, 03:32 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
  •