Monday, July 9, 2018

Zimbra mail box recrovery from crash

Description: Here I have explain how we can recover emails in zimbra and  How we can add emails to new servers from mailbox directory backup.

Procedure: 
  • First you need to find  mail id for users in source server. You can find using below mysql command
# su zimbra
# mysql -e "SELECT id,comment FROM zimbra.mailbox;
  • You will get username and mailbox id on screen.
  • You need to setup zimbra on new server and create users in new destination server
  • You can also find mail box id for one user using below command on running zimbra server
$ zmprov getMailboxInfo user1@domain.com
mailboxId: 2
quotaUsed: 0
  • Copy mails from source server from respective location [i.e. /opt/zimbra/store/0/2/msg/0]
Note: In given location 2 is store id of user which found using mysql query [/opt/zimbra/store/0/2/msg/0]
  • After copy mails make sure to change permission for zimbra user using below command
# chown zimbra.zimbra  /opt/zimbra/store/0/2/msg/0
  • After set permission on destination server you need to add emails to mailbox for respective user using below procedure
#su zimbra
$ zmmailbox
mobx> authenticate
user@domain.com password
mbox user@domain.com> addMessage INBOX /opt/zimbra/store/0/2/msg/0

Note: /opt/zimbra/store/0/2/msg/0 is the path to the destination mailbox
  • You will received info message for mails added in mailbox. Login with user and check emails are showing in mailbox. 

No comments:

Post a Comment