Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a snow-leopard os-x Server configuration running postfix with no local firewall on the X-Serve.

When a client attempts to connect to the SMTP port the connection takes about 15 seconds to accept the connection and get the smtp id string back.

Does anybody have any idea what the delay could be.

telnet smtpserver 25 takes 15 seconds externally

telnet localhost 25 is almost immediate

Using tcpdump on incoming firewall (separate host) and smtp server for the port shows that the connection is being passed through almost immediately but the response is very slow in coming back.

Thanks for the support.

share|improve this question
    
where is smtpserver defined - the name lookup for this would seem to be the most likely issue –  Mark Dec 13 '11 at 11:37
    
smtpserver is a generic name. The real host name is used when I do the test. The dns resolution is not an issue here. You could substitute the ip address for exactly the same result. –  sweetfa Dec 14 '11 at 0:39

1 Answer 1

The Delay is due to postfix doing a reverse lookup on the client IP and doing another lookup on that result to see if they get back to the IP.

if you are using a consumer connection to the internet most likely the first test will pass. but the second test will cause the problem.

you can verify this on the server itself.

nslookup <your client IP>

returns something like 80-41-90-213.dsl.iwx.uk.net

but on reversing that

nslookup 80-41-90-213.dsl.iwx.uk.net 

you will probably get SERVFAIL after a delay.

it is that delay that is showing up when you connect to the server. To find out which one go through each server in /etc/resolve.conf

nameserver x.x.x.x
nameserver y.y.y.y
nameserver z.z.z.z

test them with

nslookup 80-41-90-213.dsl.iwx.uk.net x.x.x.x

One or more will show a delay before they come back to the command prompt.

Once you've found which DNS causes the big SERVFAIL delay, replace it with another. i.e. Googles 8.8.8.8 and 8.8.4.4 currently return relatively quickly.

share|improve this answer

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.