Link to home
Create AccountLog in
Avatar of webhanson
webhansonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

PHP mail() Linux server - SMTP response 550 No reverse name (PTR)

Hi all,

We have an Ubuntu server install with sendmail, apache and php running.

The server is internal to our network and is not accessible outside of our network.

The intranet sends emails to clients and does this usually without issue however for one client I am receiving a bounceback as follows:

            "The message reached the recipient's e-mail system, but delivery was refused.  Attempt to resend the message.  If it still fails, contact your system administrator.
< intranet.mycompany.local #5.2.1 SMTP; 550 5.2.1 Mailbox unavailable. No reverse name (PTR) for your sender IP ()"

I'm not sure exactly where the issue lies, is it because it cannot resolve intranet.mycompany.local to the IP in brackets or is it that the IP in brackets does not resolve to an address?

Any help with this would be greatly appreciated. If you need anymore information please don't hesitate to ask.


Avatar of flubbard

It would appear that there is not a proper DNS record.  If this is being sent to an internal account, you may need to set up a DNS record for the server (intranet.mycompany.local) so that the reverse DNS is present.  Otherwise, you will need to have the pointer set up by your ISP so that the reverse lookup can be performed.  Finally, make sure that your that your hostname is reporting correctly on your computer and matches what's in the DNS record.  This is especially true if the intranet server is sending messages to a server outside of the intranet (even if the user is still on the intranet).

HTH - Flub
Avatar of webhanson


Hi flubbard

The intranet is internal to our network and not visible from outside.

Do I essentially need to open up the firewall and allow traffic to pass back through to the Sendmail server? if so do you know what ports would need to be opened?

The intranet is mailing to other domains on email servers external to our network.

What would the ISP set the pointer of the IP to be? would it be to intranet.mycompany.local? Not sure I understand how that would work? could you explain more.

You mentioned that you are getting a returned message bouce.  Is that from one of your servers too, or is that from a server outside?

  - flub
The bounceback is from an external mail server. Our employees login to the intranet, fill out a form entering who the email is to, the message and subject and click send. The php script then sends the email.
from the message, it's not firewall issue; no ports need to be open. "SMTP response 550 No reverse name" means the remote smtp server can not reverse DNS your smtp server ip address. Normally this means the remote server is concerned with security and has strong anti-spam rules.

In order to get a reverse DNS, you have to contact your ISP; say you get a ip address from them as, when your mail server send out email, it will be shown as sending from ( doesn't matter if your mail server is internally).  You need to ask your ISP to create a reverse DNS record, to link to


I just realized this question only rewards 20 points, that doesn't show much appreciation.
Does it matter if I get the ISP to set the domain to an address such as intranet.mycompany.local or does the host name need to be Internet visible, such as
The domain should match the name of the server - in my experience, or else you still may run into trouble.  You may try naming your server

 - flub
Hi Jackiechen,  Apologies, I have now raised the points.

So I'm clear on this:

The remote server is trying to confirm that the domain of the sending address is the reverse lookup of the sending IP or is it trying to confirm that resolves to intranet.mycompany.local?

When you say resolve, are you meaning that the remote server can directly speak with the sending mail server or simply that there is an A record in the DNS for "domain name (" set to

if I get my ISP to set the reverse lookup to be "" even though the sending mail servers FQDN is intranet.mycompany.local will this stop the issue?

Or do I need to make it so that the sending mail server has a domain name of ""?

Thanks again
Avatar of jackiechen858
Flag of Canada image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
The answers given helped confirm my understanding of how this specific mail server security measure is working.

To resolve the issue, I altered my sendmail configuration to relay via a smarthost that was already being used to relay our corporate (MS Exchange) email from the same IP.

The appropriate DNS records were already configured for this smarthost and hence resolved the issue.

Thank you for responding so quickly!