Koozali.org: home of the SME Server

Restore .mail files to running server?

kether

Restore .mail files to running server?
« on: January 06, 2006, 12:14:04 AM »
Long story short - I had a hard drive failure that brought down an SME 7b8 server. Thankfully I was able to use recovery software to rescue the /home directory. (took awhile)

I have since put up another server that is running well but now that I have the data recovered I want to restore the mail that was lost in transition (1 day's worth)

I have a cd with the /home directory on it - what's the easiest and quickest way to go about doing this? I tried manually copying files but got messages in my inbox with "invalid date" (can't exactly remember) in the title and and no content.

I know I'm probably missing an easy step here with permissions or something but I'm new to 'nix and hoped you guys could help point me in the right direction.

Is there a way to use the qmail-inject script to pull the mail from the cd into  each user's inbox? Is there another easier way?

Also, is there an external viewer that I can read the *.mail files with to check content? That would really help in situations like these.

Any help is very much appreciated... TIA

kether

Restore .mail files to running server?
« Reply #1 on: January 06, 2006, 06:41:22 PM »
Anybody? :-(

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Restore .mail files to running server?
« Reply #2 on: January 06, 2006, 08:33:15 PM »
Quote

I have a cd with the /home directory on it - what's the easiest and quickest way to go about doing this? I tried manually copying files but got messages in my inbox with "invalid date" (can't exactly remember) in the title and and no content.


What process did you use to create the cd, and what commands are you using to copy files? You shouldn't need to do anything more than put the old home directories back with the correct ownerships.

Quote

Also, is there an external viewer that I can read the *.mail files with to check content?


cat/less/mc or any other text file viewer - each mail message is a separate file inside /home/e-smith/files/users/xxx/Maildir/cur or /home/e-smith/files/users/xxx/Maildir/new, depending on whether they've ever been accessed by a mail client or not.

kether

Restore .mail files to running server?
« Reply #3 on: January 06, 2006, 09:13:23 PM »
Thanks for the reply.

I had to use a program called stellar phoenix to recover the data with a sector by sector copy and it appears that I may be out of luck as I have been trying to view the fies via a text editor and most are nonsense or nothing at all (0 bytes).

I had been using [cp -r] and then [chown user file] to copy but I am getting (invalid date) and (unknown address) showing up for each message. (which I'm now taking to mean they're corrupt)

I wasn't sure if they were text readable so I hadn't considered my results final  but this confirms my fears I guess. Oh well.

Thanks for the help - I appreciate the clarification.