Results 1 to 6 of 6

Thread: How to restore a single email with the OSS version

  1. #1
    Join Date
    Jul 2007
    Posts
    38
    Rep Power
    8

    Default How to restore a single email with the OSS version

    We are in the testing phase of deployment for our zimbra email server, and im having a bit of a time figuring out how to restoring an email from a backup and how to move an email from 1 account to the other?

    we constantly have people ask us to pull up old emails so being able to do this is kind of important.

    so far ive figured out that /opt/zimbra/store/ and /opt/zimbra/index are 2 parts of the message but simply putting these 2 files back that are associated with 1 email doesn't work.

  2. #2
    Join Date
    Jul 2006
    Location
    New York, NY
    Posts
    122
    Rep Power
    9

    Default

    Well once you have some info on the message to search for, search for it in that users /opt/zimbra/store/<user's account id>/ <== not username

    then grep through the whole directory for the message. once you have the correct message (you can 'cat' or 'more' to read it and make sure) use "zmlmtpinject" to put the message back in the users mailbox.

    I left out some details but you can find them here, or on the wikis.
    Because we all can't be geniuses, I'll go first.

  3. #3
    Join Date
    Jul 2007
    Posts
    38
    Rep Power
    8

    Default

    ok still having some issues with how zmlmtpinject works

    maybe someone can help me with syntax.

    the message i want to inject is /opt/zimbra/store/0/5/msg/258-4.msg

    the place i want for it to go is /opt/zimbra/store/0/5/msg/0/

    the username for the directory is "mattj@example.com"

    how exactly does the snytax for zmlmtpinject look to inject that single message? and what about a group of messages?

  4. #4
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    To inject that one file, something like this (extra files can be added by adding them space-delimited to the end of the command):
    Code:
    zmlmtpinject -r mattj@example.com -s sender@example.com /opt/zimbra/store/0/5/msg/258-4.msg
    To inject a whole folder full of files, something like this:
    Code:
    zmlmtpinject -r mattj@example.com -s sender@example.com -d /path/to/direcory
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    Join Date
    Jul 2007
    Posts
    38
    Rep Power
    8

    Default

    Quote Originally Posted by dkarp View Post
    To inject that one file, something like this (extra files can be added by adding them space-delimited to the end of the command):
    Code:
    zmlmtpinject -r mattj@example.com -s sender@example.com /opt/zimbra/store/0/5/msg/258-4.msg
    To inject a whole folder full of files, something like this:
    Code:
    zmlmtpinject -r mattj@example.com -s sender@example.com -d /path/to/direcory
    alright now it works, but i have 2 questions about the quirks of doing this, 1 if i restore and email to an account and then delete the restored email i have to restart zimbra service if i want to run the same command again and restore it. otherwise it tells me it completes successfully but never actually moves it.

    the 2nd thing is i cant figure out what the -s "email address" thing actually does, becuase no matter what i type in there "test@test.test" it still shows the original sender when the user logs in. so what purpose does it serve? and why do you have to use the argument to make the command work?

  6. #6
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    Quote Originally Posted by Meowmixjinx View Post
    alright now it works, but i have 2 questions about the quirks of doing this, 1 if i restore and email to an account and then delete the restored email i have to restart zimbra service if i want to run the same command again and restore it. otherwise it tells me it completes successfully but never actually moves it.
    This is the "message deduping" feature. When LMTP receives the same message for the same user twice in a short period of time, it drops the second copy. You can disable this by setting zimbraMessageIdDedupeCacheSize to 0 in the global LDAP config.

    Quote Originally Posted by Meowmixjinx View Post
    the 2nd thing is i cant figure out what the -s "email address" thing actually does, becuase no matter what i type in there "test@test.test" it still shows the original sender when the user logs in. so what purpose does it serve? and why do you have to use the argument to make the command work?
    It's the SMTP envelope sender (MAIL FROM), not the Sender: header.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Similar Threads

  1. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  2. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 02:56 AM
  3. Single user-Two email addresses-One interface
    By mansuper in forum Administrators
    Replies: 2
    Last Post: 09-07-2006, 06:06 PM
  4. Restore options for OSS version
    By iain in forum Administrators
    Replies: 2
    Last Post: 03-22-2006, 07:38 PM

Posting Permissions

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