Mass move messages to another folder with SQL

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
mja
Posts: 2
Joined: Sun Dec 04, 2016 2:51 am

Mass move messages to another folder with SQL

Postby mja » Tue Apr 18, 2017 7:55 pm

Hi,

I need to move around 300.000 messages from the Inbox folder to a subfolder. There are any problems moving it from Inbox folder directly using SQL? In this case I will update the folder_id of the mail_item table with the new folder_id, like the sql below.

Code: Select all

UPDATE mail_item SET folder_id = X WHERE mailbox_id=Y AND folder_id=Z and date BETWEEN b AND C


Will this SQL work? I need to update something else? There are anothers methods to mass move messages?

Thanks in advance,
Marlon


Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 25 guests