Forwarding an entire domain to another mail server

Discussion in 'Server Operation' started by beckteck, Jan 12, 2011.

  1. beckteck

    beckteck New Member

    Here is the sit rep:

    I have my main server with Ubuntu 8.04lts and Postfix,

    I just commissioned a new server running ubuntu 10.04lts and postfix.

    My question is how do i make forward all mail for to ?It always wants to try local delivery because of it's host name.

    I don't want it to forward all mail, just mail destined for domain.

    Thanks for reading

    Last edited: Jan 12, 2011
  2. falko

    falko Super Moderator ISPConfig Developer

    You can do this with Postfix transports.

    On the old server, create a Postfix transport now so that all emails are forwarded to the new server (for the time until the MX records of your domains have switched to the new server):

    echo "*  smtp:[<IP address of new server>]" >> /etc/postfix/transport
    postmap /etc/postfix/transport
    /etc/init.d/postfix restart
    On the new server, open /etc/postfix/ and add the hostname of the old server to the mydestination line so that the new server accepts the forwarded mails.
  3. beckteck

    beckteck New Member

    Thanks Falko,

    Although that is not exactly what I wanted to do, it did get me on the right track and was ablet to create a transport map for the new server to forward all of a certain domains mail to the old server.

    echo "" >> /etc/postfix/transport
    postmap /etc/postfix/transport
    The old server is still up and controls the domain It will remain running.

    Thanks again.


Share This Page