Re: Graceful way to move user's mail from one host to another?
Adam Rosi-Kessel wrote:
> I run a small ISP with two hosts. I need to move some user accounts from one
> system to another. There will be no DNS change--the accounts are just moving
> from subdomain to another.
>
> In the past when I've done this, I've always done an awkward one-by-one
> move, where first I rsync the user's home directory over, then I move the
> messages from the user's mail spool into a file in their home directory and
> immediately put a .forward file in place, re-rsync the home directory, then
> on the target system, I go and copy all the messages from the spool file in
> their home directory back into the real spool file in /var/mail. (In cases
> where I'm also changing DNS, I then implement the DNS change, and the
> .forward file on the first host takes care of messages delivered to the old
> IP address until the DNS change propagates).
>
> This is the only way I could think of to insure that no mail is lost in the
> short time while the transition is taking place.
>
> Is there a more graceful, and ideally scalable, way to do this?
How about:
* stop your smtpd (exim/postfix whatever) so you are not accepting any
new mail
* stop your popd/imapd so users cannot mess with their mail
* move the mail
* start smtpd/popd/imapd as appropriate
* flush backup relays if you use them
Reply to: