Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
    
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 Sep 16 '13 at 2:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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