Results 1 to 8 of 8

Thread: import .msg files into correct account

  1. #1
    Join Date
    Apr 2008
    Posts
    8
    Rep Power
    7

    Default import .msg files into correct account

    I moved our server to a new box but my backup file got corrupted so cant be restored, I have started again with a new install and created all the accounts by hand. I have managed to recover all the .msg files from in the store out of the backup file, Is there a way to have zimbra import all these emails into their correct accounts? (email addresses remained the same).

  2. #2
    Join Date
    Apr 2008
    Posts
    8
    Rep Power
    7

    Default

    I worked this out myself, I will outline how i did it incase others need the information.

    I created a php script that read each .msg file in turn and parsed the email data it contained, after a few checks to see that the message was for somone with an account on the server and that it is indeed an email the script re-creates the original email and sends it to the users email inbox via phps mail() function, its fairly easy to do - email me if you want detailed info.

  3. #3
    Join Date
    Apr 2008
    Posts
    8
    Rep Power
    7

    Default

    I no longer work for the company that i made this script for, I will see if i have a copy of it on any of my own computers to send to you.

    looks like I no longer have it. I will outline here what you need to do to re-create the script.
    recurse through the directory you have all your .msg files stored in an fill an array with all the paths to the msg files.

    loop over the array and parse each message (its the raw email data) and check that the email is addressed to somoene with an account on your server, if it is then re-build the message and use mail() to send it to that user.
    Last edited by DeanWard; 08-24-2008 at 01:48 PM.

  4. #4
    Join Date
    Nov 2006
    Posts
    6
    Rep Power
    8

    Default

    ivandulin,
    Did you get this working? If so, I am in similar dilemma and could reuse what you have. Thanks.

  5. #5
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Another method would be to use zmlmtpinject which is described in this thread :- http://www.zimbra.com/forums/install...html#post64962.

  6. #6
    Join Date
    Nov 2006
    Posts
    6
    Rep Power
    8

    Default

    Thanks! That worked perfectly for me.

  7. #7
    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    4

    Default .msg to Zimbra script

    Quote Originally Posted by DeanWard View Post
    I no longer work for the company that i made this script for, I will see if i have a copy of it on any of my own computers to send to you.

    looks like I no longer have it. I will outline here what you need to do to re-create the script.
    recurse through the directory you have all your .msg files stored in an fill an array with all the paths to the msg files.

    loop over the array and parse each message (its the raw email data) and check that the email is addressed to somoene with an account on your server, if it is then re-build the message and use mail() to send it to that user.
    Sorry, but i'm not familiar with scripts, can you send me the perl scruip and how to run it?

  8. #8
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by ehabatme View Post
    Sorry, but i'm not familiar with scripts, can you send me the perl scruip and how to run it?
    If you read the quote in your message (or the original post) you'll see that he doesn't have a copy of the script - search the forums for details on how to inject messages into your server using zmlmtpinject (or follow the link given earlier).
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. ical4j.data.ParserException
    By amit_saini54 in forum Migration
    Replies: 0
    Last Post: 12-06-2007, 07:45 AM
  2. .msg files....
    By Guest6400 in forum Administrators
    Replies: 1
    Last Post: 08-13-2007, 08:35 PM
  3. Replies: 16
    Last Post: 09-07-2006, 07:39 AM
  4. Import EML files into Zimbra
    By PaulR in forum Administrators
    Replies: 5
    Last Post: 07-29-2006, 09:06 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
  •