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.

Two VPS on 1 domain

Discussion in 'E-mail Discussions' started by ronaldst, Aug 29, 2016.

Tags:
  1. ronaldst

    ronaldst Member

    Joined:
    Feb 22, 2016
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    I have two VPS on the same domain. For description purpose lets call them
    1. VPS1.example.com (ns1 example.com + ns2 example.com)
    2. VPS2.example.com (ns3 example.com + ns4 example.com)
    I've added VPS2, NS3 and NS4 to DNS Zones on VPS1.
    I've added VPS1, NS1 and NS2 to DNZ Zones on VPS2.

    The two VPS have separate user accounts, no synchronized data etc. but VPS1 is hosting the main domain www.example.com and about 10 email accounts on that domain. Domain is hosted on GoDaddy and here I've set nameservers for the domain to NS1 and NS2. In addition I've also added separate hostnames for VPS1, VPS2 and NS1-NS4 with their correct IP addresses.

    My concerns are VPS2 and how it handles mail. How do I set this up so that VPS1 and VPS2 can send emails without them going to the wrong VPS? Traffic to mail.example.com or example.com:2096 will go to VPS1.
     
  2. acenetgeorge

    acenetgeorge Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2008
    Messages:
    64
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Southfield, MI
    cPanel Access Level:
    DataCenter Provider
    You could use a third party mail service, like Google. Or just have mail go to one of the servers, and use that server for the MX host record.
     
  3. ronaldst

    ronaldst Member

    Joined:
    Feb 22, 2016
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    Are you referring to Google Apps?

    It seem logic and reasonable to set up mail to be handeled by one of the servers. I'd very much like that idea. How is this done?
     
  4. ronaldst

    ronaldst Member

    Joined:
    Feb 22, 2016
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    I'm checking the logs on VPS2 and there's a lot of failed deliveries in the logs.

    The mail server could not deliver mail to root@vps2. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    You should not encounter any issues as long as the domain names from each VPS are not in the /etc/localdomains file on both servers (this shouldn't happen by default).

    Could you verify if the hostname is missing from the /etc/localdomains file on the affected system? If so, adding the server's hostname to this file should address the issue.

    Thank you.
     
  6. ronaldst

    ronaldst Member

    Joined:
    Feb 22, 2016
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    /etc/localdomains/ on VPS1 does not have the hostname of VPS2 in it
    /etc/localdomains/ on VPS2 does not have the hostname of VPS1 in it

    hostname in /etc/localdomains/ on VPS2 (where I get the delivery error to root@vps2) is not missing. It says
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page