r/webhosting • u/Rick_Dalton99 • 7d ago
Technical Questions Reverse DNS (PTR)
How can I resolve this issue. My domain points to a different server with an A record for the website. It uses nameservers to point to the cpanel hosting the email. This causes the error as it wants the A record to point to the email server. As a result emails to yahoo accounts are being denied.
Thanks 🙏
1
u/kai-zaphosting 7d ago
Reverse DNS doesn't live in your domain's DNS zone. It's set by whoever owns the mail server's IP, so your website's A record pointing somewhere else shouldn't matter for this. Yahoo and most big providers just check that the sending IP has a PTR record, and that the hostname it returns resolves back to that same IP.
So the fix is usually on the cPanel host's side. You can see what it returns now with dig -x <mail server IP> in a Linux/Mac terminal, or nslookup <mail server IP> on Windows. Whatever hostname comes back needs an A record pointing at that IP. If the PTR is missing or generic, ask the host to set it.
Do you have the actual bounce text from Yahoo? On shared cPanel hosting I've seen SPF or DKIM turn out to be the real problem more often than the PTR, so that's what I'd look at first. If it mentions SPF, DKIM or DMARC instead of reverse DNS, that part is set in your domain's DNS, so it's pretty much yours to fix.
1
u/Rick_Dalton99 7d ago
Thanks for the reply, It’s definitely not the SPF, DKIM or DMARC. The problem is on reseller hosting (with a dedicated ip) and it sets the cpanel to the domain name but not having the website hosted there means no A record is pointing there. Hosting says it cannot change ptr to mail.domain.com for example on reseller hosting.
I can copy the bounce text if you would like to see it.
1
u/roboticlee 7d ago
Ask your web host support team if they need to set the PTR record on their network.
Usually with a VPS server the PTR record can be set in the VPS control panel (this is separate to WHM/cPanel) but we need to ask the host to set the PTR record for a dedicated server. Much depends on the host and the type of server.
1
u/Rick_Dalton99 7d ago
It’s on a reseller hosting cpanel account, they say they. S. It change the PTR record from the domain name.
1
u/roboticlee 7d ago
The PTR can be set in the domain's zone record but it has to be set on the server or in the virtualisor. The server will have a default PTR record.
It is likely that you're stuck with using the PTR set for the reseller space. Look at the welcome emails that were sent after you purchased the reseller space to see whether there's a login for the virtualisor. If you don't have virtualisor access you will need to use the server's own PTR, just add this your domain's zone record.
1
u/kellyzdude 7d ago
What is the actual message you're getting from Yahoo rejecting the mail?
The requirements for mail are relatively complex, but only because there are a few of them. Individually they're simple enough.
The server(s) sending your mail need(s) to have valid DNS and rDNS, matching each other. mail.myhost.tld -> 192.168.0.1, 192.168.0.1 -> mail.myhost.tld. Most ideally, this matches the name that your mail server calls itself when connecting out to transfer messages. Given this is reseller territory, you will have limited control over these but it is imperative your provider gets it right.
The domain you're sending from should have valid MX records. They do NOT have to include all of the server(s) sending mail for your domain. Remember, you can send valid mail from anywhere you've authorized with your other DNS records. You can also have separate inbound and outbound paths.
Speaking of... your DMARC, DKIM, and SPF records need to be properly configured to match the data your mail host is using to send mail, and include all servers you authorize to send on behalf of your domain. That would include any outbound-filtering services that your host might be using.
Going back to the top, mail servers can reject messages for all kinds of reasons. Having the exact verbiage will go a long way to getting you an accurate answer.
2
u/Rick_Dalton99 7d ago
Thanks for the reply, this is the bounceback from yahoo (edited for privacy):
message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:[email protected]
host mta6.am0.yahoodns.net [98.136.96.75]
SMTP error from remote mail server after pipelined MAIL FROM:<[email protected]> SIZE=1917:
550 5.7.25 Forward-confirmed reverse DNS failed tnmpmscs
Reporting-MTA: dns; (host server)Action: failed
Final-Recipient: rfc822;[email protected]
Status: 5.0.0
Remote-MTA: dns; mta6.am0.yahoodns.net
Diagnostic-Code: smtp; 550 5.7.25 Forward-confirmed reverse DNS failed tnmpmscs1
u/kellyzdude 7d ago
Got it, thanks.
This looks like it's exactly (1) above.
Mismatched EHLO/HELO Hostname: Your mail server is greeting the receiving server with an internal hostname (like mail.local or a default computer name) instead of your public FQDN (Fully Qualified Domain Name).
Missing or Misconfigured PTR Record: The IP address sending the email lacks a PTR record, or the PTR record points to a domain name that resolves to a different IP address.
Multiple Hostnames in PTR: The reverse DNS lookup resolves to multiple hostnames or an alias that does not forward-resolve cleanly back to your exact sending IP.
Most likely it's an issue with the FQDN from the PTR for the IP not cleanly resolving back to the IP. I haven't seen anyone bouncing messages because HELO didn't match the DNS, but I'm sure it happens.
If you don't have a support case open with your provider already, get one open. If you already have one, update it with the full bounce you're seeing (probably unredacted so they can verify things more easily), and make it clear that your messages are being bounced because of their DNS and/or server configuration. Unless they've exposed the ability to set rDNS on assigned IPs (and it's rare in a hosting environment like this -- usually only see it for VPS or Dedicated Server where that IP is definitely assigned to me and harder to change without notice), it's 100% on them to find and fix.
3
u/saltyslugga 7d ago
Your website’s A record can stay put; incoming mail uses MX records.
I’d ask the mail host to check the outbound IP’s PTR and ensure that hostname resolves back to the same IP. The IP provider controls PTR, not your domain’s DNS panel. Check Yahoo’s exact rejection text before assuming that’s the cause.
1
u/MentalAd1373 6d ago
Since it's a reseller account with a dedicated IP, this one gets fixed on the host's side in WHM, not in your DNS zone. When Exim sends from a dedicated IP it takes the IP from /etc/mailips and the HELO name from /etc/mailhelo, and Yahoo wants three things to match: the HELO name, the PTR of that IP, and the A record of that name.
So ask support to set the PTR of your dedicated IP to something like mail.yourdomain.com and add a line "yourdomain.com: mail.yourdomain.com" to /etc/mailhelo. On your side you only add an A record for mail.yourdomain.com pointing to that IP. Your website A record can keep pointing to the other server.
7
u/Icy_Definition5933 7d ago
You need an A record for your mail server to be reachable online something like mail.example.tld, and then you need an MX record containing that exact mail.example.tld for it to barely work. After that you also need spf,dkim,dmarc and a valid ptr/rdns record with your provider to actually reach the inboxes.
If mx record fails it will fall back to root domain A record to deliver mail, but to actually land in inbox you need a fully working stack and dns zone to match, top to bottom