Results 1 to 4 of 4

Thread: Zimbra 6 rc1 installation crashed - recover emails and briefcase?

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Rep Power

    Default Zimbra 6 rc1 installation crashed - recover emails and briefcase?

    Hi all, I had a personal email domain stored on a zimbra server that had a crash, and fsck buggered up some clusters, making zimbra crash on startup.

    ldap does not wish to launch anymore, and while I may look into that to try and fix it, I'd rather be able to recover the documents I had in my personal briefcase since some contained info I need (users/pass for some services, etc)

    Where are those documents stored? Some were uploaded, others just created with the spreadsheet creator. I'll post the ldap error I'm getting if anyone has any clue as to how to go ahead and fix this also:

    Starting ldap...Done.
    Failed to start slapd. Attempting debug start to determine error.
    config error processing olcDatabase={2}hdb,cn=config: <olcAccess> handler exited with 1

  2. #2
    Join Date
    Apr 2007
    Rep Power


    Does no one know where documents created or uploaded in the briefcase end up? Would really appreciate even a pointer here..thanks!

  3. #3
    Join Date
    Apr 2007
    Rep Power


    Anybody can spare a sec to point me in the right direction? =(

  4. #4
    Join Date
    Oct 2009
    Dublin, IRELAND
    Rep Power


    First things first - is mysql working ? If it is you should be able to find stuff manually - otherwise you are left to thrawl through files on the file system.

    I don't know all the ins and outs - but zimbra basically stores pretty much everything as an MSG file. It uses indexing in the database to figure out how to interpret each file.

    The files are stored on a per user basis on the file system in folder /opt/zimbra/store/

    I think for a single server, they will always be in sub-folder 0 from there (not sure if the 0 relates to the server or the domain) so

    Within this folder, there is a sub-folder for every user you have created. And within each of those folders are a set of subfolders that actually contain the "message" files. This is where you will need to start looking.

    To check mysql, use "su - zimbra" to become the zimbra user, and run mysql

    If it is not running, look through the startup script to see if you can find the startup command and try to start it.

    If mysql is running, issuing the command "show databases;" will list all the mysql databases on your system. All the ones named "mboxgroupNN" are the individual databases for each user that contain the indexes/headers/etc for all items in their store.

    The database named "zimbra" contains the user account information.

    issue the command "use zimbra;"

    then "select * from mailbox;"

    this should give you a list of the mailboxes.

    Look for the one whose "comment" field is the email address you are looking for. Note the group_id associated with that account. This will be the value to go into the NN of the user database name. So if it is 3, you will be using database "mboxgroup3" to search for your items.

    issue the appropriate command "use mboxgroup3;" (or whatever number is appropriate)

    Once connected, issue the command "show tables;"

    Here you can see a list of the tables in that users database.

    Use "describe mail_item;" (or whatever other tables you want to look at) to figure out the sql query you will need to search for items.

    If it is briefcase - or email - I believe you need to search on "subject" - for briefcase, the uploaded file name appears to be stored as the subject field.

    So, if you are looking for a file named "LoginIds" you would need to issue the command

    select * from mail_item where subject like "%%LoginIds%%";

    The reply should list the details of the mail store item - or items that match.

    As far as I can tell, there are 2 fields that are needed to identify the actual mailstore file that contains the file you need (id and mod_content)

    so you could refine your select down to just

    select id,mod_content,subject from mail_item where subject like "%%LoginIds%%";

    This will output something like this
    mysql> select id,mod_content,subject from mail_item where subject like "%%LoginIds%%";
    | id    | mod_content | subject        |
    | 36960 |      148094 | LoginIds            |
    1 row in set (0.01 sec)
    Given this data, you can now put together the file name you need to search the store for.

    It is made up of "id"-"mod_content".msg

    So, go to the folder

    /opt/zimbra/store/0/(your mailboxgroupNN

    and search for a file named 36960-148094.msg

    I believe for a briefcase file, if you just make a copy of the file to the "subject" name you should then be able to open the file with the appropriate application.

    cp 36960-148094.msg LoginIds

    I hope this helps get you started at least.

    Good luck !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts