If you search
bugzilla there are a few RFE's for automatic refresh:
Bug 12390 - automatically reload remote calendars &
Bug 6491 - Allow automatic / scheduled reloading of feeds
In the meantime, as an .ics calendar is technically just a linked folder (similar for RSS):
zmmailbox -z -m createFolder -c gray -F "#" --view appointment --url "http://somewhere/.ics" /CalendarName
First you going to need to get the 'folder' name:
(of course script it so you can find the external .ics url easier than hunting through everyone's folders)
Then once you know all those:
You can also do this from the
zmmailbox command instead of zmprov-kinda like:
OR
OR
SOAP:
Quote:
<FolderActionRequest>
<action id="{list}" op="read|delete|rename|move|trash|empty|color|gran t|url|import|sync|fb|[!]check|update|[!]syncon" [l="{target-folder}"]
[name="{new-name}"] [color="{new-color}"] [zid="{grantee-zimbra-id}"] [url="{target-url}"]
[excludeFreeBusy="{exclude-free-busy-boolean}">
[<grant perm="..." gt="..." d="..." [args="..."] [key="..."]/>]
</action>
</FolderActionRequest>
|
Quote:
action op="sync" id="{list}"/>
- synchronize the folder's contents to the remote feed specified by the folder's {url}
|
---
Example:
Code:
#!/usr/bin/perl
my @zimbraAccounts = `/opt/zimbra/bin/zmprov getAllAccounts`;
foreach my $account (@zimbraAccounts) {
chomp $account;
my @allFolders = `/opt/zimbra/bin/zmmailbox -z -m $account
getAllFolders`;
for (@allFolders) {
chomp;
next unless /appo/;
my $sync = `/opt/zimbra/bin/zmmailbox -z -m $account
syncFolder "$1"` if $_ =~ m/^.*(\/.*) .*$/;
print $sync;
}
} If you're curious, for external mail IMAP/POP accounts (data sources) see:
[SOLVED] Automatic IMAP/POP retrieval Quote:
Originally Posted by mmorse |
--Edit--
To increase performance:
"Every time you run zmprov or zmmailbox, it has to crank up a new jvm. But you can run a batch of commands in a single zmprov or zmmailbox command. It would be better to aggregate the list of sync folder commands and then send all to one invocation of zmmailbox."
Something like this (heh btw that's not true perl syntax):
Code:
$cmds="select mailbox user1\n"
$cmds += "syncFolder /world-cup-schedule\n"
$cmds += "select mailbox user2\n"
$cmds += "syncFolder /overpriced-concerts\n"
open ZMMAILBOX "| zmmailbox"
print ZMMAILBOX $cmds