Koozali.org: home of the SME Server

Porting mail to new hardware

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Porting mail to new hardware
« on: October 20, 2004, 09:30:41 AM »
Hi all
I'm in the process of porting my 6.01-server to new hardware, with a new server-name.
Everything is going a-ok, including export/import of MySQL databases and tables, even the Horde address-list for all users.
But now I've banged my head against the wall of user mailboxes.
How do I, in a simple and not too time-consuming way, get the contents of my user-mailboxes ported to the new server.
Copying is a no-go, since all mail in the Maildir folders is 'linked' to the server-name, and just gives gibberish after copying.
I have searched, but found no reference to this problem.
Can anyone point me in the right direction ?
Greetings
wyron
...

Offline psoren

  • *
  • 371
  • +0/-0
Re: Porting mail to new hardware
« Reply #1 on: October 20, 2004, 10:32:57 AM »
Quote from: "wyron"
Hi all
I'm in the process of porting my 6.01-server to new hardware, with a new server-name.
Everything is going a-ok, including export/import of MySQL databases and tables, even the Horde address-list for all users.
But now I've banged my head against the wall of user mailboxes.
How do I, in a simple and not too time-consuming way, get the contents of my user-mailboxes ported to the new server.
Copying is a no-go, since all mail in the Maildir folders is 'linked' to the server-name, and just gives gibberish after copying.
I have searched, but found no reference to this problem.
Can anyone point me in the right direction ?


Try copying with rsync, the gibberish comes from wrong file ownership

Per

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Re: Porting mail to new hardware
« Reply #2 on: October 20, 2004, 11:03:03 AM »
Quote from: "psoren"
Try copying with rsync, the gibberish comes from wrong file ownership
Per

Thanks, Per, but are you sure that the file-reference to the servername (in every single mail) doesn't matter ??
If so, I'll install the new rsync server-contrib on the old server and try my hand at sync'ing.
Greetings
wyron
...

bobk

Porting mail to new hardware
« Reply #3 on: October 20, 2004, 01:07:50 PM »
wyron,

I did the same thing recently including changing the server name and domain name. I just copied the contents of the Maildir folders then did a recursive chown, owner and group to be user name. Permissions are 100600 (read & write by owner).

Everything is working fine.

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Porting mail to new hardware
« Reply #4 on: October 20, 2004, 01:17:56 PM »
Thanks, Bob
If it's really that simple, I'll try my hand at chown, then.
Thanks again !
Greetings
wyron
...

loveless

Porting mail to new hardware
« Reply #5 on: October 20, 2004, 09:08:12 PM »
Quote from: "wyron"
Thanks, Bob
If it's really that simple, I'll try my hand at chown, then.
Thanks again !


I sure don't recall it being that easy.  When I changed my server's name... I couldn't see any of the previous messages after I got all the Mail folders moved over.

I ended up sending out a mass mail to my users giving them the new Webmail address to the old server and told them it would remain active for X days.  I told them that if they had info that they needed, they should forward those messages to the new server.  Otherwise, after the deadline... the box (and all messages) was history.

Let me know if it works, and maybe even post up a howto of everything you did.   :-)

Thanks

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Porting mail to new hardware
« Reply #6 on: October 21, 2004, 12:36:21 PM »
Quote from: "loveless"
I sure don't recall it being that easy.  When I changed my server's name... I couldn't see any of the previous messages after I got all the Mail folders moved over.
You're scaring me, Abe!
The chown thing suggested by bobk didn't help - for the Inbox (/user/Maildir/cur), anyway.
But the funny thing is that sent-mail (in /user/Maildir/;sent-mail/cur) is fully readable.
Luckily this is only a test performed on one user, but my confusion level stays the same ?
Btw. the procedure has been:
1. Backup to workstation in RAR-files (from old server)
2. Unpack files in ibay accessible from workstation.
3. Copying (syncronizing) via mc in shell.
4. chown -R user:user *
Greetings
wyron
...

Offline byte

  • *
  • 2,183
  • +2/-0
Porting mail to new hardware
« Reply #7 on: October 21, 2004, 02:21:12 PM »
Wyron...

Make sure your folder (Maildir) and all messages are 755...this sorted us out when transfering mails

HTH
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Porting mail to new hardware
« Reply #8 on: October 21, 2004, 02:36:55 PM »
Yeah, byte, I thought of that one too.
Didn't help, though.
I just initialized a new backup of all users from the old server, and will try the same user with all Maildir files (instead of just cur and ;-folders) tonight some time.
I'll be back !
Greetings
wyron
...

calvin

Porting mail to new hardware
« Reply #9 on: October 21, 2004, 04:41:46 PM »
I do the following :

export the users from production server with lat admin tools, using
lat-dump.

Install new server on new hardware.

copy the exported files from production server to new server.

Import all accounts, ibays, groups, etc.. on ney server, again
with lat admin tools with lat-users command.

Copy shadow, smpassword, gshadow, to new server (if you want
the same password to users accounts).

Now you can copy the /home/e-smith/files/users directories from production server to new server.

For me the problems that I have is migrating application
like RT Helpdesk from www.bestpractical.com, i need to re-install again.

Offline psoren

  • *
  • 371
  • +0/-0
Porting mail to new hardware
« Reply #10 on: October 21, 2004, 07:38:41 PM »
Quote from: "wyron"
Yeah, byte, I thought of that one too.
Didn't help, though.
I just initialized a new backup of all users from the old server, and will try the same user with all Maildir files (instead of just cur and ;-folders) tonight some time.
I'll be back !


What if you change the old servername to the same as the new one, and then do the backup... Just an idea.

Per

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Porting mail to new hardware
« Reply #11 on: October 21, 2004, 08:43:40 PM »
Not at all necessary, Per.
The process description from my former message is all right; you just need to copy the complete Maildir structure, user by user, to make it work (when chown'ed).
Of course the users must be created on the new server before you start, so you have folder structures to overwrite.
I just checked two users, and their webmail runs straight now.
Its not the procedure I'd recommend for larger numbers of users, but since I have only 11, I'll manage during the week-end, I hope.
If I had more than that, I think I'd go with calvins procedure instead.
Thanks for all suggestions !
Greetings
wyron
...