Results 1 to 9 of 9

Thread: [SOLVED] Automatic IMAP/POP retrieval

  1. #1
    emmaylots is offline Loyal Member
    Join Date
    May 2008
    Location
    Nigeria
    Posts
    92
    Rep Power
    7

    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?

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

  3. #3
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,470
    Rep Power
    56

    Default

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


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    emmaylots is offline Loyal Member
    Join Date
    May 2008
    Location
    Nigeria
    Posts
    92
    Rep Power
    7

    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

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

    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 12:39 PM.

  6. #6
    emmaylots is offline Loyal Member
    Join Date
    May 2008
    Location
    Nigeria
    Posts
    92
    Rep Power
    7

    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 10:08 AM. Reason: add more explanation for other forum members

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

    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?

    <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.

  8. #8
    mikeyes is offline Active Member
    Join Date
    Oct 2008
    Posts
    47
    Rep Power
    6

    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.

  9. #9
    BigBirdy is offline Banned
    Join Date
    Feb 2009
    Location
    Squamish, BC
    Posts
    54
    Rep Power
    0

    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatic distribution lists management
    By cvidal in forum Administrators
    Replies: 6
    Last Post: 11-29-2011, 06:02 AM
  2. [SOLVED] Add another MTA to existing installation
    By oldboy in forum Installation
    Replies: 10
    Last Post: 08-20-2008, 08:03 AM
  3. Replies: 3
    Last Post: 03-20-2008, 02:50 AM
  4. [SOLVED] automatic login
    By macvijay1985 in forum Developers
    Replies: 3
    Last Post: 08-24-2007, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •