Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 1 domain and 2 VPS's with CPanel.

I configured one machine as mail server and one machine as a webserver for the domain:

Both machines have an Cpanel account like this : domain.com

I setup the MX record in DNS in my domainname provider setup to mail.domain.com (which points to VPS1 ip) and 2 A-records for domain.com and www.domain.com pointinf to VPS 2 ip.

Everything is working fine, but when I send a mail from a php-application on the web server to a local email adress on the mail server, nothing is received. I can't find those mails anywhere. Everything works ok when I setup the mail server on the same machine as the web-server.

Something tells me that these local mails coming from the other VPS (with the same domain) are rejected somehow. I found smoe things about relaying that is not allowed, but how do I configure it then so this works.

Any explanation for this (and a solution maybe) ?

share
comments disabled on deleted / locked posts

migration rejected from superuser.com Aug 31 '13 at 15:18

This question came from our site for computer enthusiasts and power users. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Falcon Momot, mdpc, Ward, dawud, gWaldo Aug 31 '13 at 15:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Falcon Momot, mdpc, Ward, dawud, gWaldo
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

If go to Edit DNS Zone on webserver and check "Remote Mail Exchanger more »" WHM delete domain from file /etc/localdomains*emphasized text* and next time, when you app try to send a email, ask to DNS for location MX of domain.

share
add comment

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