View Single Post
  #5 (permalink)  
Old 06-30-2008, 10:26 AM
mmorse mmorse is offline
Moderator
 
Posts: 6,236
Default

Keep in mind that zimbraDataSourcePollingInterval should inherited from the COS > to the account > to the data source. If a child object sets the value to '' null, it's supposed to inherit the parent value - if set to 0 or left unset via that chain, it's turned off.

Note Bug 33151- data polling interval inheritance issue
(Apparently it works - just not shown as enabled.)
zmprov mc COSname zimbraDataSourcePollingInterval 15m

Let's check the account level:
zmprov ga user@domain.com | grep zimbraDataSourcePollingInterval
Try setting the account level:
zmprov ma user@domain.com zimbraDataSourcePollingInterval 15m

Check the individual datasource level:
zmprov gds user@domain.com
Set the individual datasource level:
zmprov mds user@domain.com [external IMAP/POP account data source name] zimbraDataSourcePollingInterval 15m

You'll see a bunch of [ScheduledTask] [name=user@domain.com;mid=x;ds=name;] datasource - Import completed. in /opt/zimbra/log/mailbox.log if it's working correctly.

Bug 6491 - Allow automatic / scheduled reloading of feeds
Bug 12390 - automatically reload remote calendars (separate control attribute)

In the meantime, an 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;
         }
}
--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."

Edit2: Nice script for quick setup: [SOLVED] Automatically pop external accounts - zmprov script

Last edited by mmorse; 05-22-2009 at 01:39 PM..
Reply With Quote