Mail sending question

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Mail sending question

Unread post by Galactic Zero »

What would cause some mail to take up to 4 hours to be delivered off server? Between users on the server, near instant, off server 4 hours or so and it is to different domains...

Thanks.
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

Could this be related to the failure of reverse lookups for my domains?
From www.dynamicnetworkservices.com
??
Reverse lookup of nameserver IP not found for xxx.xxx.xxx.xxx: NXDOMAIN
Cannot check to see if the reverse lookup of the nameserver IP matches its hostname

CentOS 5 / PSA 8.3 ( in the cp it was set to localhost only, tried each of the other two settings any made it worse and localnet didn't do squat to fix.)


I have in my named.conf file
options {
allow-recursion {127.0.0.1/xxx.xxx.xxx.xxx/24;(repeated for each IP address on server);
};
directory "/var";
auth-nxdomain no;
pid-file "/var/run/named/named.pid";
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Yeah I can see that happening if the system on the other side requires lookups. Id also check to see if you're on any RBL's, or the other server(s) are using greylisting.
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

OK, is my allow-recursion statement correct? If so, why isn't it working? When I test it says it isn't allowing reverse lookups.

Thanks
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You can check pretty quickly with nslookup, it will tell you what DNS server its talking to.
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

well, that works well...
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Recursion and reverse lookups don't have a lot to do with eachother. Reverse lookups need correct PTR DNS records (1 PTR record per IP address) and chances are that your provider owns the IP block you're using, so you'd need to set up these PTR records through them, unless you do manage your own IP block.
Lemonbit Internet Dedicated Server Management
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

OK, since I do virtual hosting each domain needs the same PTR record for the main mail server?

So, since galacticzero.net is the main mail server and has a ptr record for the main IP address on the server, do I put that record in each domain or do I also set the other IP's to point to galacticzero.net also?

so...
xxx.xxx.xxx.1/24 galacticzero.net
xxx.xxx.xxx.2/24 galacticzero.net

etc...
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Galactic Zero wrote:OK, since I do virtual hosting each domain needs the same PTR record for the main mail server?
You should have one PTR record per IP address, not per domain. If you have a VPS server you probably don't operate the IP block that you're using (if you do, then you'll know). Your server provider maybe provides a control panel to set up reverse DNS (PTR) records, or you might need to email them about it.
So, since galacticzero.net is the main mail server and has a ptr record for the main IP address on the server, do I put that record in each domain or do I also set the other IP's to point to galacticzero.net also?
You don't need a record in every domain's DNS zone.

You should have:

- An A record that maps your server's hostname to its IP address
- A PTR record that maps the IP address to your server's hostname

You probably have that A record in the DNS zone for galacticzero.net on your server if that's also the nameserver for galacticzero.net, but if you don't own the IP block there is no use in having PTR records on your server. You need to set this up at the IP block owner.

The default Plesk DNS template has an entry for a PTR record I believe, but that's kind of pointless to have if your server provider owns the IP blocks, which is the case most of the time I believe.
Lemonbit Internet Dedicated Server Management
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

I host at The Planet, and have 12 IP's. One is main IP of server, 7 are for single sites , 2 for name servers and 2 are shared hosting.

My server is a physical box, not a VPS.

So, each dedicated IP needs a PTR record pointing to it's IP and domain or the mail server and for the shared IP's what needs to happen?

I remember taking the PTR record out of the DNS template for the reason you mentioned that only one domain per IP has a PTR record.
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I'm sorry, I said VPS because I triggered on the word virtual, but that was just Apache vhosts of course. If you have a dedicated server, you probably still don't operate your own IP block (unless this is different in the US than in Europe). I think you need to talk to The Planet to get your PTR records in order.
Lemonbit Internet Dedicated Server Management
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

So, for the two IP's that are shared, just pick on of the domains as the PTR and don't worry about the rest?
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Better use the server's hostname instead of a random domain on your server. Causes less confusion in things like mail headers.
Lemonbit Internet Dedicated Server Management
Post Reply