--- Original message ---
From: "Wietse Venema" <[email protected]>
Date: 18 July 2014, 17:43:34
> Wietse Venema:
> > wishmaster:
> > > Hi!
> > >
> > > I have strange behavior of Postfix (postfix-2.11.1_1,1)
> > >
> > > I use FreeBSD as base system and some jails. Each jail use
> > > virtual network stack (vnet). Problem is in latency when
> > > connection is outside from the base system only.
> > >
> > > telnet localhost 25 works fine, but if this connection or from
> > > jail or from LAN it is latency about 10 seconds before I see 220
> > > example.com.ua ESMTP Postfix
>
> Another cause of delays is having IPv6 and IPv4 address for the
> destination host, but IPv6 is broken so the client falls back to
> IPv4 after 10 seconds. I had that yesterday with a non-jail host.
This server (world/kernel) has been compiled with WITHOUT_INET6
> > Is that 10 seconds to establish a TCP connection? The telnet client
> > looks up the destination host address, and your host may be configured
> > to query DNS before searching /etc/hosts. With a bad /etc/resolv.conf
> > file, or with bad firewalling/routing for DNS queries/replies, that
> > causes delays, typically a multiple of 5 seconds (RES_TIMEOUT=5).
> >
> > Is that 10 seconds for Postfix to respond after TCP completes? This
> > is typically the result of a bad /etc/resolv.conf file, but may
> > also be caused by bad firewalling/routing for DNS queries/replies,
> > typically causing delays of a multiple of 5 seconds (RES_TIMEOUT=5).
> >
> > So the proceduce is:
> >
> > 1) Disable chroot in master.cf (all columns 5 = "n") and "postfix
> > reload".
> >
> > 2) Check your /etc/resolv.conf.
> >
> > 3) Check your /etc/host.conf and /etc/nsswitch.conf.
Your true. The problem is in hosts file. If I add something like below
192.168.254.253 example.com.ua
where 192.168.254.253 is jail's IP, I don't see latency.
Interesting things.
ping sex.com trying ping without latency, but
host sex.com waits about 5 seconds.
I think something wrong with my /etc/nsswitch.conf witch is default!
But this is another story. Thanks for help.
--
Vitaliy