简体   繁体   中英

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 (client@domain.com and me@gmail.com).

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 me@gmail.com receives the message.

After a few minutes, qmail (MediaTemple mail system) sends me an error email saying that client@domain.com "no longer accepts mail".

What's weird is that when I send an email to client@domain.com 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!

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?)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM