Recently I had the fun of researching how to and then importing ~150000 .msg emails into zimbra, this is how I did it.
You will need:
- ubuntu 10.04 LTS
- zimbra 7.1.4 installed
- ssh access to zimbra box (Putty)
- scp access to zimbra box (winscp)
- some common sense
my zimbra 7.1.4 GA Release was running on ubuntu 10.0.4 LTS
The very first zimbra store folder usually belongs to the admin so we need the next* incremented mailbox store id.
this is an example zimbra store for admin:
/opt/zimbra/store/0/1/msg/1
Create a user account that will hold all the emails in zimbra admin panel, then send one email somewhere so zimbra would create a store folder for the account.
Once i have sent one email form the user who will have all the emails imported, zimbra created this store:
/opt/zimbra/store/0/13/msg/0
now we use SCP to copy all the messages to /opt/zimbra/store/0/13/msg/0 , after the copying has finished it might be a good idea to give zimbra full access to these emails.
cd /opt/zimbra/store/0/13/msg/0
sudo chown -R zimbra.zimbra
now we create a folder in zimbra for the user to keep the recovered emails, we will do this in the via putty/ssh.
start zimbra admin
/opt/zimbra/bin/zmmailbox -zadmin
select the user account that will receive all the imported mail
selectMailbox goofy@funkyemailaddress.com
createfolder /Recovery
now we exit zimbra cmd with a Ctrl + C
cd /opt/zimbra/
to begin import
/opt/zimbra/bin/zmmailbox -z -m goofy@funkyemailaddress.com addMessage /Recovery store/0/3/msg/*
if while importing you receive an error about the emails being too large, we increase the size of email messages.
/opt/zimbra/bin/zmprov -z mcf zimbraFileUploadMaxSize 41943040
/opt/zimbra/bin/zmprov -z mcf zimbraMtaMaxMessageSize 41943040



