I have a subdomain of a site, lets say foo.example.com
which has an A record to the IP of another server, lets say example2.com
. Ideally, I would like to have the example2's server also take care of the MX record for the foo.example
subdomain, but I'm not sure how this would work.
I'm wondering what the options are for doing this, whether this will work:
example.com DNS:
foo A xx.xx.xx.xx
foo MX mx.example2.com
example2.com DNS:
mx MX mx.thirdserver.com
Or could I set up a new dns zone on the example2
server which would just handle the MX record for the foo.example.com
domain, where any mail sent to foo.example.com
would be handled by these mx records.
Or, alternately, should I solve this with a cname or dname record