Hey Kazil, welcome to the forums!
"Selective" import is actually a planned feature (and your post will push it a little up on our dev's schedule), but it is not yet implemented.
In my opinion your best shot is to use the REST api to export only the emails arrived in the last 2 days and re-import this email in the accounts on the new server.
The export command is the following (run as Zimbra user):
Code:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL “//inbox.zip?query="after:11/20/11” > /tmp/user@domain.com.zip
(change the date according to your needs - mind that it must be specified in the same format used by your account)
Transfer the files to the new server and import the files with:
Code:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=zip&resolve=skip” /tmp/user@domain.com.tgz
The 'resolve=skip' option tells Zimbra not to import duplicated items, just to be sure that no duplicates are created.
I suggest you to try and manually do this procedure on 1 or 2 accounts to check if everything is ok and then create a script to import all mailboxes (zmprov -l gaa to get a list of all the accounts on the server, then process this list with awk).
Try and see if this solution fits to your case, then if you see it's good I can help you with the scripting part if you need..
Have a nice day,
Cine
Bookmarks