Slow client connection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Slow client connection

Roman Gelfand-2
2 client machines connect via telnet to postfix smtp server on port 25.  All machines are on the same subnet.  One machine gets helo instantaneously.  The other it takes roughly 20-30 secs.  I had similar problem in the past where dns reverse resolution was problem.  However, here there is reverse resolution.  Would anyone know what else it could be?  Also, assuming it is a dns problem, is there a dns command(s) used to troubleshoot this type of problem? 

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Slow client connection

James B. Byrne

On Tue, January 6, 2015 12:41, Roman Gelfand wrote:
> 2 client machines connect via telnet to postfix smtp server
> on port 25. All machines are on the same subnet.  One machine
> gets helo instantaneously.  The other it takes roughly 20-30
> secs.  I had similar problem in the past where dns reverse
> resolution was problem.  However, here there is reverse
> resolution.  Would anyone know what else it could be?

Suggestions:

Is the 'slow' host running a dns service (caching only or otherwise)
itself?

How is the resolver set up on the slow host?

If you run dig on the slow host are the requests for the incoming
fqdns serviced any faster than by postfix?

--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:[hidden email]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

Reply | Threaded
Open this post in threaded view
|

Re: Slow client connection

James B. Byrne
On Tue, January 6, 2015 15:08, Roman Gelfand wrote:
> I do run dns server on both client machines.
>
> The dig response of the client machine from the client machine that
> connects immediately has one more entry.  It is bringing back an A
> record of the client machine.
>
> As it turns out that was the issue.  I am not sure why.  If you could
> explain it, I would appreciate it.
>

I do not know why, but I can speculate that postfix checks for an A
record if certain checks are enabled, or perhaps it does so
regardless, and then has to go look for an MX record if it does not
find it.  Two lookups plus a possible timeout value.

--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:[hidden email]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


Reply | Threaded
Open this post in threaded view
|

Re: Slow client connection

lists@rhsoft.net


Am 06.01.2015 um 22:52 schrieb James B. Byrne:

> On Tue, January 6, 2015 15:08, Roman Gelfand wrote:
>> I do run dns server on both client machines.
>>
>> The dig response of the client machine from the client machine that
>> connects immediately has one more entry.  It is bringing back an A
>> record of the client machine.
>>
>> As it turns out that was the issue.  I am not sure why.  If you could
>> explain it, I would appreciate it.
>>
>
> I do not know why, but I can speculate that postfix checks for an A
> record if certain checks are enabled, or perhaps it does so
> regardless, and then has to go look for an MX record if it does not
> find it.  Two lookups plus a possible timeout value

postfix always checks for the PTR and A-record of the connecting IP
otherwise logging like below would not be possible

proper working name resolution is a basic requirement

Jan  6 22:29:50 mail-gw postfix/smtpd[15616]: warning: hostname
server4.vivahostingworld.com does not resolve to address 103.238.216.215
Reply | Threaded
Open this post in threaded view
|

Re: Slow client connection

Wietse Venema
In reply to this post by Roman Gelfand-2
Roman Gelfand:
> 2 client machines connect via telnet to postfix smtp server on port 25.
> All machines are on the same subnet.  One machine gets helo
> instantaneously.  The other it takes roughly 20-30 secs.  I had similar

That is surely the result of DNS or /etc/hosts configuration issues.
Postfix looks up the client hostname in /etc/hosts or DNS, then it
looks up the IP address for that hostname in /etc/hosts or DNS.

Look for differences in /etc/hosts, and for differences in PTR and
A records, for the affected IP addresses.

        Wietse