Results 1 to 3 of 3

Thread: Importing .msg from recoverd store folder

  1. #1
    razametal is offline Active Member
    Join Date
    Feb 2008
    Location
    Manta - Ecuador - South America
    Posts
    36
    Rep Power
    7

    Default Importing .msg from recoverd store folder

    Hi,

    I've found from a backup the folder /opt/zimbra/store only, the other paths like /opt/zimbra/index or the ldap configs are lost

    I'm trying to inject the files with extension .msg from the backup folder that i've got to a new server with users that I have created like on the old server. It is possible to determine the owner of each numbered folder in the store or scan the message to determine the correct user account?

    I'm trying with the following command line, but it's showing me all messages sent from user1 to others, but not precisely the messages to user1:

    Code:
    find /media/zimbra/backup-20120702-01/store/0 -type f | xargs grep "Return-Path: user1@mydomain.com.ec"
    This is the outup:
    Code:
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/4518-8000.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/7994-14634.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/6708-12144.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/5473-9716.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154msg/1/5618-9963.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/5650-10032.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/5910-10540.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/5450-9670.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/7968-14583.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/5295-9376.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/6744-12212.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/154/msg/1/7667-14016.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/1/7039-12776.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/14086-26307.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/14872-27820.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/13771-25658.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/16269-30526.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/12413-23086.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/12478-23216.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/14602-27333.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/14533-27192.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/15212-28461.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/15190-28419.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/15191-28420.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/3/12444-23150.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3619-6254.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/829-1207.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3539-6098.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/1270-1955.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2434-4209.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/1063-1579.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3973-6930.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2815-4856.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3383-5830.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3650-6314.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2920-5038.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/1039-1546.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3443-5932.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2508-4347.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/1887-3181.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2403-4153.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/548-673.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3645-6305.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3114-5353.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2395-4134.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/4027-7034.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2476-4285.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3395-5845.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3649-6312.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3646-6306.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3977-6935.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3647-6309.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/1057-1569.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3502-6035.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/3123-5365.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/99/msg/0/2455-4241.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/4057-7092.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/606-777.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/2964-5115.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/1133-1692.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/562-705.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/3970-6927.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/4020-7021.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/44/msg/0/850-1236.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/140/msg/0/2801-4832.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/140/msg/0/1656-2731.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/140/msg/0/1051-1563.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/140/msg/0/3648-6311.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/140/msg/0/542-663.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/140/msg/0/3108-5339.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/152/msg/0/1013-1510.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/152/msg/0/3612-6236.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/96/msg/2/11067-9894.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/162/msg/0/1817-3798.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/162/msg/0/1049-1197.msg:Return-Path: user1@mydomain.com.ec
    /media/zimbra/backup-20120702-01/store/0/162/msg/0/2373-5424.msg:Return-Path: user1@mydomain.com.ec

  2. #2
    LMStone's Avatar
    LMStone is offline Moderator
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,374
    Rep Power
    10

    Default

    You can just look at a message in each folder, e.g. via the "less" command, review the header and you will see to whom the mail was from or delivered to create the mapping between each folder in ~/store and and the users.

    If you have a lot of users, to recover the mail it might be easier to do the following:
    1. Once you identify a user's folder in /store, copy that folder to another Linux box naming it after the user, e.g. "jdoe".
    2. On that other Linux box, install a Courier IMAP server and point Courier to the folder tree into which you have copied all the users' folders.
    3. Courier can read raw messages from a Zimbra server just fine.
    4. Build your new Zimbra server.
    5. Using imapsync or a mail client of your choice connected to Courier and Zimbra at the same time, copy the old emails hosted on the Courier server to the new Zimbra server.


    Hope that helps,
    Mark
    Last edited by LMStone; 07-27-2012 at 08:37 AM. Reason: typo

  3. #3
    razametal is offline Active Member
    Join Date
    Feb 2008
    Location
    Manta - Ecuador - South America
    Posts
    36
    Rep Power
    7

    Default

    Hi LMStone:

    With less command I can be sure of the owner of the sent messages looking for "Return-Path:". For importing the .mgs files I'll be using /opt/zimbra/bin/zmlmtpinject.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Store answer in the same folder
    By leSasch in forum Administrators
    Replies: 14
    Last Post: 08-07-2013, 01:28 PM
  2. Understand zimbra store folder
    By sirio81 in forum Administrators
    Replies: 2
    Last Post: 04-02-2012, 11:43 PM
  3. Exporting/importing multiple folder structure...
    By pbp_lars in forum Migration
    Replies: 10
    Last Post: 05-23-2011, 07:58 AM
  4. How to empty store folder safely?
    By marisu in forum Developers
    Replies: 2
    Last Post: 09-26-2008, 12:16 AM
  5. Backup Store Folder
    By tri in forum Installation
    Replies: 2
    Last Post: 10-05-2006, 09:27 AM

Posting Permissions

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