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 Display Modes
  #1 (permalink)  
Old 08-07-2006, 01:28 PM
Senior Member
 
Posts: 58
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 01:31 PM.
Reply With Quote
  #2 (permalink)  
Old 08-07-2006, 10:16 PM
Zimbra Employee
 
Posts: 4,784
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.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 08-08-2006, 11:37 AM
Senior Member
 
Posts: 58
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?
Reply With Quote
  #4 (permalink)  
Old 08-08-2006, 12:26 PM
Zimbra Employee
 
Posts: 4,784
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.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #5 (permalink)  
Old 08-09-2006, 12:50 PM
Senior Member
 
Posts: 58
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?
Reply With Quote
  #6 (permalink)  
Old 08-10-2006, 09:21 AM
Zimbra Employee
 
Posts: 4,784
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
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
Reply


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

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0