6 messages in net.sourceforge.lists.courier-usersRE: [courier-users] Transfer mail que...
FromSent OnAttachments
Bowie BaileyMay 17, 2006 1:34 pm 
Sam VarshavchikMay 17, 2006 3:17 pm 
Bowie BaileyMay 18, 2006 8:47 am 
Binand SethumadhavanMay 18, 2006 9:58 am 
Daniel FaberMay 20, 2006 5:47 pm 
Sam VarshavchikMay 20, 2006 6:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [courier-users] Transfer mail queue to a new machineActions...
From:Bowie Bailey (Bowi@BUC.com)
Date:May 18, 2006 8:47:40 am
List:net.sourceforge.lists.courier-users

Sam Varshavchik wrote:

Bowie Bailey writes:

I seem to recall that this question has been asked before. But a search of the archives via Google didn't turn up anything.

My mail system is currently running on a temporary server. I have rebuilt my primary server and am ready to migrate back onto it. I can copy over the maildirs with no problem, but I was wondering about the mail queue.

Since both servers are running the same version of Courier installed with the same settings, I think I should be able to move the queue over to the new server simply by copying over the /var/spool/courier directory structure (while Courier is shut down on both servers). Will this work?

Definitely not. It's good that you asked first. You just saved yourself a lot of grief.

Good to know. I always try to ask before doing something that might break my servers. :)

Out of curiosity, what is it that causes the problem with copying the queue structure?

Is there a better way to do it?

Start the new server. Verify that it works, and it's accepting mail.

On the old server, put ":[a.b.c.d]" in esmtproutes, restart the old server and run "courier flush".

Let Courier forward everything in its mail queue to the new server.

The only thing I'm really worried about is mail going to my users. If one of the queue messages times out, I want to make sure the bounce goes to the user's new mailbox location on the new machine.

If I clear out hosteddomains and esmtpacceptmailfor before I do the flush, that should make sure everything gets sent over to the new server, right? Do I need to clear the userdb as well?

The goal is to shut down the old server, rsync the maildirs and queue files to the new server, and then start up the new server with a minimum of downtime for the users.

Unfortunately, I can't test this procedure without building a third Courier server which I don't currently have the hardware for.

You don't really need to do anything here. Move the maildirs, then leave the old server running for a week, until everything gets flushed from its queue during ordinary course of business.

I guess I could do this. It would be better in some ways. If I clear out hosteddomains, esmtpacceptmailfor, and userdb as mentioned above, everything should go to the proper place assuming my internal MX records are correct.

I was hoping I could get away with a straight copy of the queue and avoid all of these configuration issues on the old system.