SOLVED: Re: mailq takes 25 sec to respond
mexas at bristol.ac.uk
Fri Feb 15 16:49:34 UTC 2008
On Fri, Feb 15, 2008 at 11:33:34AM -0500, Bill Moran wrote:
> In response to Anton Shterenlikht <mexas at bristol.ac.uk>:
> > On my ds10l alpha sendmail seem to work fine with the exception
> > of very long wait time for mailq (sendmail -bp) - about 25 sec.
> > I'm not convinced it is an alpha problem, so I post to this list.
> > On a much slower i386 running the same version of OS and of sendmail
> > it takes less than a second.
> > # uname -srm
> > FreeBSD 6.3-STABLE alpha
> > # sendmail -d0.1
> > Version 8.14.2
> > Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
> > NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SCANF
> > TCPWRAPPERS USERDB XDEBUG
> > The only software difference between my i386 and my alpha I can think of
> > is that on alpha I run IPF:
> > # grep "= 25" /etc/ipf.rules
> > pass out on dc0 proto tcp from any to any port = 25 flags S/SA keep state
> Based on your description of the probem, you should ensure that all
> block rules in ipf include logging, and see if running mailq is triggering
> a timeout because it can't communicate over the network. 25 sec is
> suspiciously close to 30 seconds, which is a common timeout value for
> network operations.
> sendmail needs to communicate on more ports than just 25, so it's
> likely that you've blocked something else that it needs ... DNS perhaps?
I solved it first reading http://www.goldfisch.at/knowledge/70 :
"If sendmail takes very long time for starting and
output of mailq takes many seconds, than you might
have a name-resolve-problem. Check logfiles for
gethostbyaddr ... failed - entries and fix corresponding
which is what I did:
% grep gethostbyaddr /var/log/maillog
Feb 15 03:01:23 <myhostname> sendmail: gethostbyaddr(10.10.10.1) failed: 2
Feb 15 03:01:58 <myhostname> sendmail: gethostbyaddr(10.10.10.1) failed: 2
Feb 15 03:02:40 <myhostname> sendmail: gethostbyaddr(10.10.10.1) failed: 2
I then found why I get this error, from http://www.sunhelp.org/faq/sendmail.html
"QUESTION: Why does my Solaris machine generate the error
"sendmail: gethostbyaddr failed" whenever I send mail?
ANSWER: One of more of the IP addresses configured on your
system does not have a matching entry in /etc/hosts.
sendmail does a "reverse" lookup (input IP address,
output hostname) when it starts up, generating the
error. You can either fix /etc/host and your Nameservice,
or ignore the message."
Although I had an entry for the second ethernet port (10.10.10.1) in
/etc/rc.conf, I didn't have it in /etc/hosts.
I fixed /etc/hosts and all is fine now.
Room 2.6, Queen's Building
Mech Eng Dept
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233
Fax: +44 (0)117 929 4423
More information about the freebsd-questions