On Thursday, July 30, 2009 at 10:35 CEST,
     Maróy �kos <a...@maroy.hu> wrote:

> I wonder if this can be achieved easily. I'm migrating from one server
> to another, which includes migrating the postfix mailserver as well.
> I'm hosting a number of virtual domains on the mail server. Naturally
> I want to make the transition as smooth as possible.
> 
> I'm planning to migrate the virtual domains one by one - and I will
> also have to face the fact that the update of the MX record for the
> domain will take some time. Thus, for some time, mail will arrive an
> both the old and new locations from various sources.
> 
> Therefore I'm thinking about a solution where I can tell the old mail
> server to accept the mail for the specific virtual host, but to
> forward it immediately to the new server.

Yes, that's the right approach. When the new server has been set up,
convert the domain to a relay domain and list the valid recipients in
relay_recipient_maps. If you've made the MX record switch and that
change has propagated to the old server you're done. Otherwise, use the
transport table to force the mail routing to the new server.

http://www.postfix.org/postconf.5.html#relay_domains
http://www.postfix.org/postconf.5.html#relay_recipient_maps
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/transport.5.html

> Thus, even if the mail goes to the old server, it will land at it's
> new and correct location. Of course, this should only be working for
> the duration of the transition period.
> 
> I was looking at the documentation here:
> http://www.postfix.org/VIRTUAL_README.html where there is a catch-all
> virtual domain forwarding configuration - but that would forward all
> mail to a single mail account. What I'm looking for is to forward a
> complete domain - that is, all mail destined for that domain to be
> forwarded to a different server, with the same recipient e-mail
> address.

Virtual aliasing is only the right tool if you wish to change the
envelope recipient addresses, but in this case you want to change
the routing and leave the message envelope and contents intact.

-- 
Magnus Bäck
mag...@dsek.lth.se

Reply via email to