Greetings Zimbra Community!

I've scoured the forums trying to find an answer in an attempt to fix what I have done, but cannot. This is my first week with Zimbra, and I feel like I screwed up pretty bad. However, nothing really seems to be broken, at least nothing that is readily obvious to me.

My Zimbra installation is on a VPS, so naturally I wanted to encrypt my mail and index volumes. This was a bit of an afterthought, so several hundred thousand messages have already been migrated to the server. In my ignorance, this is what I did:

-Create encrypted index volume using EncFS
-Create encrypted store volume using EncFS
-Configure permissions for Zimbra to read/write to those volumes
-Add the new volumes in the Administration Console
-Set the new volumes to current
-Stop Zimbra
-Copy all data from /opt/zimbra/index to the new volume
-Copy all data from /opt/zimbra/store to the new volume
-Start Zimbra

...and everything works! But then I start my cleanup. I do the following:

-Zip up the /opt/zimbra/index
-Zip up the /opt/zimbra/store
-Delete "index1" from the Administration Console
-Delete "store1" from the Administration Console... OR NOT!

That was my first error: Cannot delete volume! The volume is in use.

Strange, I thought. So I went poking around online to try and find an answer, which I couldn't. Then I went poking around the database, which was probably a bad plan. I went to the database and executed the following:

DELETE FROM zimbra.volume WHERE id=1;

Now my original unencrypted store was out of the database, but alas it was still showing up in the Administration Console. I still couldn't delete it. I tried reindexing all of my mailboxes. That was no help. Next I ran this command:

zmblobchk --volumes 4 start

The results were very discouraging because I received thousands of messages like:

Mailbox 13, volume 4, /opt/zimbra/store-decrypted/0/13/msg/0/929-1990.msg: unexpected blob. File size is 3745.

A quick search on the internet revealed that these errors were caused by Zimbra's index and MySQL's index for the volume on these messages not matching. Strangely though, I could still see messages that were throwing these errors in the user's mailboxes. So they weren't gone.

Next, I tried to backtrack a bit. I re-added the record I deleted in the MySQL table zimbra.volume. Then I created a symlink from my encrypted store to the original /opt/zimbra/store directory. I made that the current message store in the Administration Console and restarted Zimbra.

The problem is that I'm still getting these "unexpected blob" errors. A search for the mailbox MySQL schema revealed that I might be able to simply update the volume_id in the mboxgroupN.mail_item tables. But wait! I don't have a volume_id in any of those tables!!

mysql> describe mboxgroup1.mail_item;
+--------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------------+------+-----+---------+-------+
| mailbox_id | int(10) unsigned | NO | PRI | NULL | |
| id | int(10) unsigned | NO | PRI | NULL | |
| type | tinyint(4) | NO | | NULL | |
| parent_id | int(10) unsigned | YES | | NULL | |
| folder_id | int(10) unsigned | YES | | NULL | |
| index_id | int(10) unsigned | YES | | NULL | |
| imap_id | int(10) unsigned | YES | | NULL | |
| date | int(10) unsigned | NO | | NULL | |
| size | bigint(20) unsigned | NO | | NULL | |
| locator | varchar(1024) | YES | | NULL | |
| blob_digest | varchar(44) | YES | | NULL | |
| unread | int(10) unsigned | YES | | NULL | |
| flags | int(11) | NO | | 0 | |
| tags | bigint(20) | NO | | 0 | |
| tag_names | text | YES | | NULL | |
| sender | varchar(128) | YES | | NULL | |
| recipients | varchar(128) | YES | | NULL | |
| subject | text | YES | | NULL | |
| name | varchar(255) | YES | | NULL | |
| metadata | mediumtext | YES | | NULL | |
| mod_metadata | int(10) unsigned | NO | | NULL | |
| change_date | int(10) unsigned | YES | | NULL | |
| mod_content | int(10) unsigned | NO | | NULL | |
| uuid | varchar(127) | YES | | NULL | |
+--------------+---------------------+------+-----+---------+-------+
24 rows in set (0.03 sec)

Is there anything that I can do to fix these issues? Is there some other way that I haven't found where I can reassign the correct volumes to these messages?

I'm concerned that I've really broken things here. Have I? Or since I can still see the messages, is everything basically a non-issue? I would like to be able to fix this though...