If you need to inject or import .eml or .msg files into a zimbra account…
Step 1. Move files
Move the .msg or .eml files into a tmp or other directory on your zcs server. Just make sure you have enough space. In my case these files did not have file extensions due to the way they were cross searched and collected from several email accounts. So, the file extension is not important.
Step 2. Go to the directory
cd into the directory that contains your files
cd /var/tmp/tmpdirectory
Step 3. Do as zimbra
su zimbra
Step 4. Command
in my case, all of the file names started with 0 so I was able to use 0* as a descriptor
for i in 0* ; do zmmailbox -z -m destination_account@domain.com addMessage /inbox/subfolder $i ; done
Step 5. Conclusion
You can alter the folder that the messages are dropped into by altering the /inbox/subfolder/subfolder part of the command. Or, you can just drop them into the inbox with /inbox. As far as I know, there is no folder depth limit. Enjoy. I hope this saves your butt like it did for me.