zmblobchk and unexpected blob error messages

      Comments Off on zmblobchk and unexpected blob error messages

What to do if you receive an unexpected blob after performing a zmbobchk check?

# su - zimbra
% zmblobchk -v start
[] INFO: Setting mysql connector property: maxActive=100
[] INFO: Setting mysql connector property: maxActive=100
Checking mailbox 1.
Checking mailbox 2.
Checking mailbox 3.
Checking mailbox 4.
Checking mailbox 5.
Checking mailbox 6.
Checking mailbox 7.
Checking mailbox 8.
Checking mailbox 10.
Checking mailbox 11.
Mailbox 11, volume 1, /opt/zimbra/store/0/11/msg/14/58276-359897.msg: unexpected blob. File size is 584863.
Checking mailbox 15.
Checking mailbox 18.
Checking mailbox 20.
...

This means that the message with id 58276 has no corresponding mysql entry with meta data. The normal routine goes like this:

% mysql zimbra -e "select comment from mailbox where id='11';
+---------------------------------+
| comment                     |
+---------------------------------+
| [email protected] |
+---------------------------------+

Get the metadata for the item (could be useful later)

% zmmetadump -m 11 -i 58276

Copy the file (aka: blob)

% cp -p /opt/zimbra/store/0/11/msg/14/58276-359897.msg /tmp/

Delete item 5876 from the account and re-add it

% zmmailbox -z -m [email protected] deleteItem 58277
% zmmailbox -z -m [email protected] addMessage /Inbox /tmp/58276-359897.msg

Unfortunately, this generally fails… try this:

% /bin/rm -f /opt/zimbra/store/0/11/msg/14/58276-359897.msg
% zmblobchk -m 11 start
[] INFO: Setting mysql connector property: maxActive=100
[] INFO: Setting mysql connector property: maxActive=100
Checking mailbox 11.

To understand why, let’s create the exact same problem.

% touch /opt/zimbra/store/0/11/msg/14/582767-359897.msg
% zmblobchk -m 11 start
[] INFO: Setting mysql connector property: maxActive=100
[] INFO: Setting mysql connector property: maxActive=100
Checking mailbox 11.
Mailbox 11, volume 1, /opt/zimbra/store/0/11/msg/14/582767-359897.msg: unexpected blob. File size is 0.

The fix is to remove the file we just created.

% rm -f /opt/zimbra/store/0/11/msg/14/582767-359897.msg
% zmblobchk -m 11 start
[] INFO: Setting mysql connector property: maxActive=100
[] INFO: Setting mysql connector property: maxActive=100
Checking mailbox 11.



Facebooktwitterredditpinterestlinkedinmail