The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Relaying email to old mail server

Discussion in 'E-mail Discussions' started by molecool, Jan 22, 2011.

  1. molecool

    molecool Registered

    Joined:
    Jan 22, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have a domain that is currently hosted on my old server. I'm in the process of switching to a new server and this is what I want to do:

    - Capture all email traffic here at the new server and deliver it to each respective mailbox.
    - After that I want to also *relay all emails on to my old email IP* so that it collects and routes mail to mailboxes there as it does right now.

    The last point is the important one. I just looked at the mail forwarder in Cpanel and all it's doing is to forward emails from one domain to another. For example:

    mick@foo.com-> mick@bar.com

    That is NOT what I'm looking for. What I need is this:

    mick@foo.com (running on new IP as mapped by MX entries) ----> mick@foo.com (on old IP running outside the network)

    In essence, the old email server runs as a shadow of the new email server. Does this make sense and how is it done?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    You cannot route emails to two locations for the same domain with two different IPs. The better way to do it would be to setup oldmail.foo.com and have emails forward to oldmail.foo.com as a subdomain on foo.com

    The way email works, MX records can be different fully qualified domain names or route to a select IP, but they only route once for that domain until they reach a destination. Even secondary and tertiary MX records only hold emails temporarily until the primary MX record is back up and then route to the primary in that event.

    As such, you can add a subdomain for the old domain to receive emails for those accounts (and then route from the subdomain once they are delivered to the old server locally to the other domain).

    Otherwise, a better approach is likely to just rsync the email data, since you don't have to use email to copy them over to the old server. Rsync and scp are both copying methods to copy data from one server to another. Using rsync or scp, you could simply copy the data from the one machine to the other periodically via a cron.

    Thanks.
     
Loading...

Share This Page