Difference between revisions of "Debo-Notes"

(Created page with '== Mailbox Move (Open Source Edition) == As an example, we have a two server setup mail1.example.com & mail2.example.com. One should be able to move user@example.com from mail1.…')
 
m (Mailbox Move (Open Source Edition))
Line 16: Line 16:
  
 
zmprov -l ma user@example.com zimbraMailHost mail2.example.com
 
zmprov -l ma user@example.com zimbraMailHost mail2.example.com
 +
 
zmprov -l ma user@example.com zimbraMailTransport lmtp:mail2.example.com:7025
 
zmprov -l ma user@example.com zimbraMailTransport lmtp:mail2.example.com:7025
  

Revision as of 15:03, 29 April 2010

Mailbox Move (Open Source Edition)

As an example, we have a two server setup mail1.example.com & mail2.example.com. One should be able to move user@example.com from mail1.example.com to mail2.example.com as below. In the following steps, all commands are executed on mail1.example.com

1) Mark user@example.com status as 'Maintenance' as below:

zmprov -l ma user@example.com zimbraAccountStatus maintenance


2) Export user@example.com with zmmailbox:

zmmailbox -z -m user@example.com getRestURL "//?fmt=tgz&query=is:anywhere" >/opt/zimbra/backup/user@example.com.tgz


3) Change account setting as below:

zmprov -l ma user@example.com zimbraMailHost mail2.example.com

zmprov -l ma user@example.com zimbraMailTransport lmtp:mail2.example.com:7025


4) Import user@example.com.tgz to mail2.example.com with zmmailbox:

zmmailbox -u https://mail2.example.com:7071 -a admin@example.com -p yourpasswd -m user@example.com postRestURL "//?fmt=tgz&resolve=reset" /opt/zimbra/backup/user@example.com.tgz


5) Mark user@example.com status as 'Active'

zmprov -l ma user@example.com zimbraAccountStatus active


6) Delete user@example.com MySQL records, also delete /opt/zimbra/store/0/$mailbox_id, /opt/zimbra/index/0/$mailbox_id. $mailbox_id can be found in MySQL table zimbra.mailbox


Please note after this move share references to user@example.com folders won't work, which means user@example.com will have to share his folders to others again.

I haven't written a script for step 6 yet. I'll post a script after I get it work for me.

Jump to: navigation, search