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 via email to