Monday, February 11, 2008

Collecting mail from external servers on Zimbra

Do you have Zimbra users who want to pull mail into their Zimbra accounts without having to press "Get Mail" or "Get External Mail" every time? It's easy.

In the Zimbra server's command line, running as user zimbra, try:
zmprov gc default | grep zimbraDataSourcePollingInterval
If you get a response, the number it gives you is the number of seconds between checks of the external mail boxes. If you don't get any response, that means that the zibraDataSourcePollingInterval isn't set yet. Set it like this:
zmprov mc default zimbraDataSourcePollingInterval 180
Now the external mail accounts will be checked every 3 minutes.

But wait!! There's a problem. If your users created secondary accounts before you did this, their mail might not get picked up on schedule. (This is certainly the case as of 5.0.0_GA_1869.) So, you need to set the polling interval for each of your users' data sources manually -- or with a script that you write yourself.

For each user, check what datasources they have now:
zmprov gds myuser |grep DataSourceName
where myuser is the name of the user, of course. Then, for each user modify the data source with the command:
zmprov mds [username] [dataSourceName] zimbraDataSourcePollingInterval [seconds]

For example:
zmprov mds myuser Migration\ Account zimbraDataSourcePollingInterval 180
Notice the \ and space in "Migration\ Account" in my example. The name of this data source is "Migration Account". If you have spaces in your data source name like I do here, then you need to use the backslash (\) to escape the space. Otherwise, the system thinks that the next word is part of the next option or command in the line. (This is pretty standard *Nix-ish behavior, but if you're a newbie it can throw you off.)


(The info for this post was found at http://www.zimbra.com/forums/installation/11487-solved-receiving-mail-multipop3-server.html and through personal experience with this problem last week...)

7 comments:

Anonymous said...

It is work, you are great

Anonymous said...

Thank you, this solved my problem!

InAHurry said...

very helpfull.
Thanks

Anonymous said...

Thanks! You've helped me solve an issue I've been searching the zimbra forums for, for weeks!

Anonymous said...

Great. Very good explained and it works!! many thanks

Anonymous said...

Hi,

Thanks, this works great.

Varma said...

Hi
Is there any option to delete messages after 1 month at external data source