Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot resolve PTR record 1

Status
Not open for further replies.

ryansdv

Programmer
May 19, 2003
42
0
0
PH

hello all!

please help me this, im new with linux centOS mail server.
everytime i send email (ex. yahoo account), cannot send.
this error will be sent back to me -> cannot resolve PTR record on "client ip"

regards,


ryan


 
Email relies on a working DNS, as you have discovered. In order for it to work correctly, you need to have both a forward and reverse maping.

In your DNS configuration folder, there should be several files. Some of these files will point to localhost, which are used to provide root hints, or in other words are used to help resolve unknown addresses. Two of the files will define a forward and reverse mapping.

For example, here are two lines from my server's mapping for a printer with a static IP. Note, there are not public IP addresses, nor are they publically addressable.

Forward mapping: magicolor IN A 192.168.0.3
Reverse mapping: 3 IN PTR magicolor.debian.lan.

The first line defines the name (magicolor) and points this to the lan IP. the second line takes the address and is a POINTER to the name. It sounds like this is what is missing.

Both entries need to be in the SOA or start of authority record for the LAN.

For my server, these definitions look like this:
IN SOA server.debian.lan. admin.debian.lan. (... with the definitions above going here in a () block.

Two other important points. One, the final '.' is important to define the FQDN (fully qualified domain name). Two, in these files, the column in which entries appear and white space are important!


 

thank you Noway2 for the idea.
i would like to clarify if the dns directory you mean is
/etc/named.conf


 
/etc/named.conf is the configuration file for a DNS server... you don't necessarily need to run a DNS server.

What is in your /etc/resolv.conf? This is where you configure the DNS servers that your system will use to look up host names and IPs.

Annihilannic.
 

/etc/resolv.conf contains the ff:

search <dns name>
nameserver <dns ip address>
nameserver <dns ip address>






 
You must figure out which DNS server is in charge of your address range. For a business, it is either self housed or at an ISP. For residiential, likely it is an ISP.

This is the DNS server that must have your PTR record, you cannot change anything locally to affect the change.

type your ip into:

 

The ip address of the mail server PTR record is already set by my ISP. So no problem anymore with my email server reversed DNS.

but the problem is...
sample:

this is my email address: abc@teksample.com
email server ip address : 125.5.50.56
i try to send email to xyz@yahoo.com

this is exactly the error:

The following recipient(s) cannot be reached
450 4.4.0 <xyz@yahoo.com>... Relaying temporarily denied. Cannot resolve PTR record for 222.127.0.9

were 222.127.0.9 is the gateway ip when i send my email.

 
These IP addresses look weird, but OK - I'll roll with it...

You don't want to be pointing your PTR at your gateway address, you want to be pointing it at the server address.

Looking at the 2 IPs your provided I'm going to assume that either your server is not running a static IP visible to the outside (NAT) or it's not on the same network as that gateway, which means the gateway needs to be set up to route any traffic it gets for mail purposes to the IP of your mail server. That would probably be ports 25 and 110 for sure, and I'm not sure if there are any others.

Something is really weird in this configuration....
 
So your mail transfer agent is attempting to send the message to the next hop, which is the gateway and it is saying that it can't resolve it.

Is your MTA configured to relay through your ISP or do you have your relay configured to relay to your gateway?

The dns PTR issue appears to be with your gateway. As the previous posts stated, the resolve.conf points to the DNS, and these servers need to be able to resolve this gateway.

I would try setting your relay host to the SMTP server of your ISP, assuming you haven't. One advantage of this is that it is undoubtedly a "registered" mail sender meaning that most recipients will white list it, while if you attempt to launch the message directly, many recipients may bounce it.




 

thank very much to all of you. of your precious time.

i put the gateway ip in /etc/mail/access

ip address RELAY


then it solves the problem.

 
Guys..........
Just out of curiosity. Is there a way to make a quick reverse pointer in /etc/hosts and not have setup a reverse zone?

[root@netwatch ~]# yum remove windows
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: windows
No Packages marked for removal

OH YEAH!
 
/etc/hosts entries of the usual "IP hostname [ optional.hostname.domain ] " format should resolve both ways using getnamebyaddr() calls.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top