1

I have 2 hosting server and domain.

Let say domain-X is pointed to server-X & domain-Y is pointed to server-Y.

Hosted a site on server-Y & a sub-domain of domain-X is forwarded to domain-Y.

I send mails from the site hosted in the server-Y. But I don't want to use the mail server of the server-Y. I want to use the mail server of server-X.

Is it possible?

2 Answers 2

1

If you have console/administration access to the machines (e.g. you are not on shared hosting) here are two examples (on Unix & Linux Stack Exchange) of what configuration you need to perform:

Basically what you need to do is to configure your server-Y to use server-X as its relay.

1

The mail server to send mail to for a given domain will be determined by the mx record. You can manage this with your domain's DNS manager by making entries that point to the desired server for a given domain. This will not affect email sent by other servers claiming to be for this domain, other than the mail will likely end up in spam folders if SPF and DKIM records are not set up or not set up correctly.

1
  • I have done this for sites hosted on servers running WHM/Cpanel. You have to change the MX record and change a setting in WHM on the server that hosts the HTML content so that it knows not to try and send the email internally. I'd imagine there's a similar setting for those not running WHM/Cpanel.
    – TecBrat
    Commented Sep 16, 2013 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.