Link to home
Start Free TrialLog 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.

Thanks,

Avatar of flubbard
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

ASKER

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 123.11.22.33, when your mail server send out email, it will be shown as sending from 123.11.22.33 ( doesn't matter if your mail server is 192.168.44.55 internally).  You need to ask your ISP to create a reverse DNS record, to link 123.11.22.33 to yourmailserver.yourdomain.com.




 

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 google.com?
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 mail.mydomain.com.

 - 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 me@mycompany.co.uk is the reverse lookup of the sending IP 20.20.20.20 or is it trying to confirm that 20.20.20.20 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 (google.com)" set to 20.20.20.20?

if I get my ISP to set the reverse lookup to be "mycompany.co.uk" 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 "mycompany.co.uk"?

Thanks again
ASKER CERTIFIED SOLUTION
Avatar of jackiechen858
jackiechen858
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!