Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-2008, 05:17 AM
Loyal Member
 
Posts: 87
Thumbs down [SOLVED] Automatic IMAP/POP retrieval

Hi,

How do I configure Zimbra to automatically pull mails on schedule from external mails using POP3 into individual users mailboxes?
Reply With Quote
  #2 (permalink)  
Old 06-30-2008, 05:19 AM
Moderator
 
Posts: 7,911
Default

[SOLVED] IMAP periodic polling not working
__________________
Reply With Quote
  #3 (permalink)  
Old 06-30-2008, 05:20 AM
Zimbra Consultant & Moderator
 
Posts: 19,639
Default

Search the forums for zimbraDataSourcePollingInterval and you'll find a lot of answers to your question.
__________________
Regards


Bill
Reply With Quote
  #4 (permalink)  
Old 06-30-2008, 09:13 AM
Loyal Member
 
Posts: 87
Default

This is the commands I got from the forums, but it's still not pulling mails automatically.
I also added the command at user(account) level, still no result.
I removed the account, then added it, still the same result, what do I have to do.




zimbra@mail:~$ zmprov mc default zimbraDataSourceMinPollingInterval 5m
zimbra@mail:~$ zmprov mc default zimbraDataSourcePollingInterval 15m
zimbra@mail:~$ zmprov gc default | grep zimbraDataSourcePollingInterval
zimbraDataSourcePollingInterval: 15m
zimbra@mail:~$ zmprov gc default | grep zimbraFeatureMailPollingIntervalPreferenceEnabled
zimbraFeatureMailPollingIntervalPreferenceEnabled: TRUE
Reply With Quote
  #5 (permalink)  
Old 06-30-2008, 10:26 AM
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
  #6 (permalink)  
Old 06-30-2008, 10:56 AM
Loyal Member
 
Posts: 87
Thumbs up Eureka!

While waiting for the result,a thought flashed through my mind :I would prefer to vote for these settings to be made available only in the Administrator UI.
Thanks it worked.
I configured it at the user level
Can you please explain why it didn't work at the COS level

Here are the commands:

zimbra@mail:~$ zmprov gds dexter.faraday@robocop.com
# name Exchange Server
# type imap
objectClass: zimbraDataSource
objectClass: zimbraImapDataSource
zimbraDataSourceConnectionType: cleartext
zimbraDataSourceEnabled: TRUE
zimbraDataSourceFolderId: 282
zimbraDataSourceHost: 192.168.5.19
zimbraDataSourceId: fa89fd58-c7e9-4f9d-b34f-1439eaf0958e
zimbraDataSourceName: Exchange Server
zimbraDataSourcePollingInterval: 0
zimbraDataSourcePort: 8143
zimbraDataSourceUsername: dexter@i-robot.com
zimbraPrefFromAddress: dexter.faraday@robocop.com
zimbraPrefFromDisplay: Dexter E. Faraday

# name POP
# type pop3
objectClass: zimbraDataSource
objectClass: zimbraPop3DataSource
zimbraDataSourceConnectionType: cleartext
zimbraDataSourceEnabled: TRUE
zimbraDataSourceFolderId: 2
zimbraDataSourceHost: 10.1.1.100
zimbraDataSourceId: 7cab365f-81da-410b-a1b3-fa1a3a48d991
zimbraDataSourceLeaveOnServer: TRUE
zimbraDataSourceName: POP
zimbraDataSourcePollingInterval: 0
zimbraDataSourcePort: 110
zimbraDataSourceUsername: dexterf
zimbraPrefFromAddress: dexter.faraday@robocop.com
zimbraPrefFromDisplay: Dexter E. Faraday


then I entered the command at the user level:

[B]zmprov mds dexter.faraday@robocop.com POP zimbraDataSourcePollingInterval 10m
[/B]
then confirmed with this command:

zmprov gds dexter.faraday@robocop.com


got this output:

# name Exchange Server
# type imap
objectClass: zimbraDataSource
objectClass: zimbraImapDataSource
zimbraDataSourceConnectionType: cleartext
zimbraDataSourceEnabled: TRUE
zimbraDataSourceFolderId: 282
zimbraDataSourceHost: 192.168.5.19
zimbraDataSourceId: fa89fd58-c7e9-4f9d-b34f-1439eaf0958e
zimbraDataSourceName: Exchange Server
zimbraDataSourcePollingInterval: 0
zimbraDataSourcePort: 8143
zimbraDataSourceUsername: dexterf@i-robot.com
zimbraPrefFromAddress: dexter.faraday@robocop.com
zimbraPrefFromDisplay: Dexter E. Faraday

# name POP
# type pop3
objectClass: zimbraDataSource
objectClass: zimbraPop3DataSource
zimbraDataSourceConnectionType: cleartext
zimbraDataSourceEnabled: TRUE
zimbraDataSourceFolderId: 2
zimbraDataSourceHost: 10.1.1.100
zimbraDataSourceId: 7cab365f-81da-410b-a1b3-fa1a3a48d991
zimbraDataSourceLeaveOnServer: TRUE
zimbraDataSourceName: POP
zimbraDataSourcePollingInterval: 10m
zimbraDataSourcePort: 110
zimbraDataSourceUsername: dexterf
zimbraPrefFromAddress: dexter.faraday@robocop.com
zimbraPrefFromDisplay: Dexter E. faraday

then I waited.......

And ...it worked.

You guys are awesome.

Last edited by emmaylots; 06-30-2008 at 11:08 AM.. Reason: add more explanation for other forum members
Reply With Quote
  #7 (permalink)  
Old 06-30-2008, 11:55 AM
Moderator
 
Posts: 6,236
Default

As discussed via the other thread, we decided to forgo Bug 22114 - Expose external account polling interval in UI because of the server performance effects -even if you set a min you might not be prepared for the consequences; however you can vote for Bug 21199 - add ability to set autopolling in admin console

There's also: Bug 33151 - data polling interval inheritance issue

Could you update your profile with version info so I can get to the same repo point as you?

Can you nail down a set of steps? ie: Is it only prior accounts that have difficulty, are new accounts fine from the point you set the cos value?

cc cos
ca user
mc datasourcepollinginterval
ga user > shows fine?
add external account
gds user > does it get inherited right?

vs

add external account to existing cos (without datasource set)
no value shown on ga or gds
mc datasourcepollinginterval
ga user > show fine?
gds user > not inherited?

Quote:
<attr id="455" name="zimbraDataSourcePollingInterval" type="duration" min="0" cardinality="single" optionalIn="dataSource,account,cos" callback="DataSourceCallback" flags="accountInfo,accountInherited,domainAdminMod ifiable">

<desc>
The time interval between automated data imports for a data source, or all data sources owned by an account. If unset or 0, the data source will not be scheduled for automated polling.
</desc>
</attr>

Last edited by mmorse; 02-17-2009 at 03:15 PM..
Reply With Quote
  #8 (permalink)  
Old 12-06-2008, 05:28 PM
Active Member
 
Posts: 44
Default

-I setup a new server.
-I set the COS to 5m on the mail polling interval.
-I then created a user using that COS.
-The user then setup an external account.

Mail from the external account would only show up on the zimbra server if the user logged into the zimbra web interface and click the 'get mail' button.

-I ran the zmprov ga command to check the main account and the zimbraDataSourcePollingInterval value was missing
-I ran the zmprov gds command and the zimbraDataSourcePollingInterval value was set to 0 on the external account

I manually updated the zimbraDataSourcePollingInterval value to 7m and the account began automatically checking the external account.

Did I do something wrong in the server setup?
Will I have to manually modify the zimbraDataSourcePollingInterval value on each user that wants to use external accounts?
I would much prefer to have this value adjustable via the UI

Thanks

Release 5.0.10_GA_2638.SuSEES10_20081003035627 SuSEES10 NETWORK edition

Last edited by mikeyes; 12-06-2008 at 05:33 PM..
Reply With Quote
  #9 (permalink)  
Old 05-13-2010, 04:57 PM
Active Member
 
Posts: 46
Default

Oh my goodness!! What in the world are all these methods, commands and ways in which to simply retreive pop/imap mail on a schedule. Zimbra is such a great product in so many ways and likely with many talented people working on the software. And nobody can figure out a way in which some tools, a script (in or out of zimbra) can be controlled in the interface with a simple on/off and interval for the polling? Sorry to appear critical, but given how common this feature, the complexity/effort required is disproportionate.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.