Migrating MX servers

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Migrating MX servers

Peter Berghold
Hello,

I am in the process of decommissioning my own personal email server which is running on an antiquated version of CentOS and an old version of Postfix (2.3.3) to a Debian 7 server running Postfix 2.9.6.

I've got a tool for copying  the IMAP mailboxes from the old server to the new server.  
What I'd like to do next is figure out a way to have Postfix instead of delivering to the local maildir on the old host deliver it to the maildir on the new host either by injecting the mail into the queue on the new host or some other means.  

What I'm trying to prevent is either generating false bounces during the change over of the MX records to the new host.

Thinking ahead I'd also like to use that capability to set up another host to act as a secondary MX for my personal domain.

Thoughts anybody?

Reply | Threaded
Open this post in threaded view
|

Re: Migrating MX servers

Wietse Venema
Peter Berghold:

> Hello,
>
> I am in the process of decommissioning my own personal email server which
> is running on an antiquated version of CentOS and an old version of Postfix
> (2.3.3) to a Debian 7 server running Postfix 2.9.6.
>
> I've got a tool for copying  the IMAP mailboxes from the old server to the
> new server.
> What I'd like to do next is figure out a way to have Postfix instead of
> delivering to the local maildir on the old host deliver it to the maildir
> on the new host either by injecting the mail into the queue on the new host
> or some other means.

Steps in order:

1) Before migrating the MX service, reduce the TTL for your MX
records.

2) Make sure that the new MX host will accepts mail for your domain
and that it stores into a local message store (i.e. your domain is
listed in mydestination, virtual_alias_domains or virtual_mailbox_domains).

3) Change DNS records and replace the MX record that points to the
old host with an MX record that points to the new MX host.

4) Wait 2*TTL to allow old cached MX records to expire globally.

5) On the old MX host remove your domain from the domain name lists
in mydestination, virtual_alias_domains or virtual_mailbox_domains.

From this point the old MX host will reply with "relay access denied"
when random SMTP clients attempt to deliver mail for your domain
to the old MX host.

6) Increase the TTL for your MX records as appropriate.

> What I'm trying to prevent is either generating false bounces during the
> change over of the MX records to the new host.

After step 5) your old MX host will no longer accept mail for your
domain, except from clients that have relay permissions.

> Thinking ahead I'd also like to use that capability to set up another host
> to act as a secondary MX for my personal domain.

That is an entirely different problem.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Migrating MX servers

Steve Jenkins-2
In reply to this post by Peter Berghold
On Sun, Apr 26, 2015 at 8:30 AM, Peter Berghold <[hidden email]> wrote:
Hello,

I am in the process of decommissioning my own personal email server which is running on an antiquated version of CentOS and an old version of Postfix (2.3.3) to a Debian 7 server running Postfix 2.9.6.

If the Postfix version is the only reason you're decommissioning the old CentOS box, why not just upgrade Postfix from 2.3.3 to 2.11 and keep all your old settings? This upgrade path works very smoothly on CentOS. Here's a walk-thru:


But if you have other reasons for wanting to change servers, then the steps Wietse shared are what you'll need.

SteveJ

 
Reply | Threaded
Open this post in threaded view
|

Re: Migrating MX servers

blue_cowdawg
No the other reason is the age of the host and the fact I have beefier hardware to move to.

Sent from my android device.

-----Original Message-----
From: Steve Jenkins <[hidden email]>
To: Peter Berghold <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Sun, 26 Apr 2015 19:01
Subject: Re: Migrating MX servers

On Sun, Apr 26, 2015 at 8:30 AM, Peter Berghold <[hidden email]> wrote:
Hello,

I am in the process of decommissioning my own personal email server which is running on an antiquated version of CentOS and an old version of Postfix (2.3.3) to a Debian 7 server running Postfix 2.9.6.

If the Postfix version is the only reason you're decommissioning the old CentOS box, why not just upgrade Postfix from 2.3.3 to 2.11 and keep all your old settings? This upgrade path works very smoothly on CentOS. Here's a walk-thru:


But if you have other reasons for wanting to change servers, then the steps Wietse shared are what you'll need.

SteveJ