Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When trying to send an email via Sendmail using the server's IP address to make the SMTP connection (rather than localhost) I get this message in the headers "may be forged" in brackets after the IP address. From what I can see the rDNS is configured correctly:

[root] nslookup ip.ad.dr.es

Non-authorative answer

es.dr.ad.ip.in-addr,arpa name = fqdn.domain.com

[root] dig -t a fqdn.domain.com

fqdn.domain.com IN A ip.ad.dr.es

In /etc/hosts, I have this listed:

127.0.0.1 fqdn.domain.com localhost.localdomain localhost

Should I have fqdn.domain.com against the actual external IP address in .etc/hosts? Or is there a problem elsewhere?

TIA!

share|improve this question
    
What is the exact command you are using to send the message? –  einstiien Feb 10 '10 at 18:47
    
I'm using PHP to send the email directly via SMTP. –  liquorvicar Feb 10 '10 at 19:01
add comment

2 Answers 2

What OS is this? I've had issues on Debian/Ubuntu in the past where the kernel tries to be clever - if you connect to the external IP address on the same server that IP is assigned to, it actually routes it through the localhost adapter.

This issue had me stumped for ages when I was setting up a firewall - I was only allowing traffic in on the external adapter, but the firewall was blocking any requests made from that machine - turns out it was routing it through localhost which the firewall had been told to block.

In your case what you end up with is sendmail receiving the connection on localhost (127.0.0.1) but the EHLO stating the external ip.ad.dr.es - hence thinking its forged.

Just a shot in the dark, may not apply to your case. If you've got another server with sendmail available, try getting that one to connect to the external IP address on this sendmail server.

share|improve this answer
    
The OS is RHEL5. I can connect from an almost identical RHEL5 server and relay through this sendmail instance. It's only connections initiated from this server to itself using it's external IP that have problems. –  liquorvicar Feb 10 '10 at 19:01
add comment
up vote 0 down vote accepted

Ok, I have resolved this. it was the fact that the FQDN was listed in /etc/hosts against the localhost IP (127.0.0.1). Removing the FQDN from that line and adding a new line with the external IP and the FQDN solved it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.