Results 1 to 6 of 6

Thread: imapsync and mail filters

  1. #1
    Coilcore is offline Senior Member
    Join Date
    Nov 2005
    Posts
    55
    Rep Power
    9

    Default imapsync and mail filters

    I'm attempting to migrate a sizable number of users to Zimbra and have a problem.

    Immediately after creating the acocunt in Zimbra, two filters are created to automatically tag certain mail messages based on a header. This works just fine for mail which comes in through the MTA.

    In using imapsync to migrate mail, these server side filters are not being run. Since imapsync does a transfer from port 143 to port 143, I'm guessing the filtering occurs closer to the MTA. This is a bit of a problem.

    We could create a script to use SOAP to pull down every message of the user, request the full content (because these headers are not in the abbreviated headers), regex for the header, and tag the messasge. But based on the volume of mail this could take days or even weeks to process all of the mail. Not to mention the fact that it will be a pain to build the script in the first place, just to dispose of it later.

    Is there a better way to apply these filters while imapsync is migrating mail? Is there something we could do within imapsync (like add a zimbra specific header or modifiy the imapsync perl code itself) that might trigger a specific tag? Is there any magic, like doing the 're-index' or some zm... command that will reapply the server side filters on the existing messages? Any help here is greatly appreciated.
    Last edited by Coilcore; 08-07-2006 at 12:31 PM.

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    One idea would be to deliver/import the mail with LTMP (there is a zmlmptinject). I've asked a few folks here if they can think of a better way.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Coilcore is offline Senior Member
    Join Date
    Nov 2005
    Posts
    55
    Rep Power
    9

    Default

    Right now with imapsync we have a completely identical copy of the email (every header the same). Wouldn't using LMTP change the headers of the mail, most importantly the received date?

  4. #4
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    You can override the received date with X-Zimbra-Received header. Is there any reason you can't tag/label the mail in it's current location prior to imapsync so the sync can just move the mail and not need to make changes.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  5. #5
    Coilcore is offline Senior Member
    Join Date
    Nov 2005
    Posts
    55
    Rep Power
    9

    Default Tagging

    The mail in the previous system is 'tagged' by the presence of the header. Understandably ZCS doesn't recognize this header, so we made mail filter rules to add a zimbra style tag if the header is present. Its could be that this is the wrong way to handle this, but its what worked for us for up until the sync problem. Is there a better way?

  6. #6
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Quote Originally Posted by Coilcore
    The mail in the previous system is 'tagged' by the presence of the header. Understandably ZCS doesn't recognize this header, so we made mail filter rules to add a zimbra style tag if the header is present. Its could be that this is the wrong way to handle this, but its what worked for us for up until the sync problem. Is there a better way?
    Which clients (web, IMAP, POP, etc) did you use with this and how did they work with this header? Or was this 'tagging' exposed to the user in a different way. Seems to get this data moved to Zimbra you'll need to use LMTP as that's the only way you can get the filters to run. Eventually we'll add the ability to run filters across a folder or your mailbox. In that case you could just imapsync and then apply the filter after the fact.

    http://bugzilla.zimbra.com/show_bug.cgi?id=1112
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. maximizing imapsync speed - parallel runs
    By bewley in forum Migration
    Replies: 4
    Last Post: 09-30-2008, 03:14 PM
  2. Migrating User Accounts - and ImapSync
    By kirme3 in forum Administrators
    Replies: 7
    Last Post: 08-28-2008, 10:35 AM
  3. Mail Replication with imapsync
    By moniker in forum Administrators
    Replies: 7
    Last Post: 04-22-2007, 10:51 AM
  4. From POP3 and 100 scattered mailboxes to Zimbra
    By spiderman in forum Administrators
    Replies: 5
    Last Post: 08-11-2006, 08:00 PM
  5. Replies: 1
    Last Post: 04-13-2006, 04:47 PM

Posting Permissions

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