Jonathan Roy
Jonathan Roy

Reputation: 903

Email issue with DNS and (maybe) PHP mail()

On my client's website (domain.com) we have a contact form which sends an email to the client an me ([email protected] and [email protected]).

The email is sent using PHP mail() function.

The website is hosted on my web server (MediaTemple DV) but the client has it's own server where Exchange is running (IP: xx.xxx.xx.xx, DOMAIN: server.com). Since the emails are handled by his server, I had to modify the DNS records on domain.com.

A: mail.domain.com -> xx.xxx.xx.xx
MX: (0) domain.com -> mail.domain.com
MX: (10) domain.com -> mail.server.com

When I use the contact form, I don't get any PHP error but only [email protected] receives the message.

After a few minutes, qmail (MediaTemple mail system) sends me an error email saying that [email protected] "no longer accepts mail".

What's weird is that when I send an email to [email protected] FROM gmail.com, then he gets it. Note that the client can still send email from Outlook with no problem.

Also note that all my other emails on other domains on my MediaTemple server work fine.

Does anyone have an idea why it behaves like this?

Thanks!

Upvotes: 1

Views: 868

Answers (1)

marramgrass
marramgrass

Reputation: 1411

Make sure the mail service for the domain is turned off on the (dv) - it's trying to deliver locally and not even checking the DNS. That should immediately solve the problem.

(Also, probably a question for ServerFault?)

Upvotes: 1

Related Questions