Long delay while connecting with 127.0.0.1

Long delay while connecting with 127.0.0.1

am 24.01.2008 21:04:04 von olv.goo

I have a long delay (~10sec per message) while sending mail with
sendmail. If I do the following:

domain# sendmail -v -finfo@domain.ru user@yandex.ru < /dev/null

I get
--------------------------------------------------
user@yandex.ru... Connecting to [127.0.0.1] via relay...
220 domain.ru ESMTP Sendmail 8.14.2/8.14.2; Thu, 24 Jan 2008 18:24:45
+0300 (MSK)
>>> EHLO domain.ru
......
etc.
--------------------------------------------------

The long delay occurs while connecting to 127.0.0.1. That is the
problem. Is there any way to configure sendmail to send mail in the
right way e.g

user@yandex.ru... Connecting to mx1.yandex.ru. via esmtp...

Thank you in advance.

Re: Long delay while connecting with 127.0.0.1

am 25.01.2008 20:34:03 von Hans-Peter Sauer

olv.goo@gmail.com unleashed the infinite monkeys on 24/01/2008 20:04
producing:
<---SNIP--->
> The long delay occurs while connecting to 127.0.0.1. That is the
> problem. Is there any way to configure sendmail to send mail in the
> right way e.g

That is the "right way" - RTFM.

It could well be that your DNS server isn't resolving 127.0.0.1 into a
hostname.

--
Rob MacGregor (BOFH)

Rule 37: "There is no 'overkill'. There is only 'open fire'
and 'I need to reload.'"

Re: Long delay while connecting with 127.0.0.1

am 25.01.2008 22:18:53 von olv.goo

Thank you. The define confTO_IDENT solved the problem.

> It could well be that your DNS server isn't resolving 127.0.0.1 into a
> hostname.
>

Re: Long delay while connecting with 127.0.0.1

am 26.01.2008 11:46:23 von Kari Hurtta

olv.goo@gmail.com writes in comp.mail.sendmail:

> Thank you. The define confTO_IDENT solved the problem.
>
> > It could well be that your DNS server isn't resolving 127.0.0.1 into a
> > hostname.

Should not needed.


confTO_IDENT is ident timeout.

If 127.0.0.1 (localhost) does not run identd, sendmail gets immediately
connection refusing when sendmail does ident query. That does not cause
delay.

Or have you firewall rules, which prevent sendmail getting connection
refusing ?

Or have you something listening ident (auth) -port, which does not answer
to question but instead hang?

/ Kari Hurtta

Re: Long delay while connecting with 127.0.0.1

am 26.01.2008 17:04:37 von olv.goo

Thank you for your reply.

> Or have you firewall rules, which prevent sendmail getting connection
> refusing ?

I had, but I disabled all of them.

> Or have you something listening ident (auth) -port, which does not answer
> to question but instead hang?

I am not certain. Would you please to point me out how to make sure
with it?

Well, after some reading the manuals, I am now trying to debug it with
-d option and I am getting the following:

my-domain# /usr/sbin/sendmail -v -bm -d61.11 -fuser@my-domain.ru
user2@yandex.ru < /dev/null
sm_gethostbyname(my-domain.ru, 28)... failure

The another working sendmail (on another machine) gives the second
argument in sm_gethostbyname to be equal to 2, not 28.
The same failure occurs with the localhost. I guess it can be a IPv6
vs IPv4 issue but I am not confident with it.

>If 127.0.0.1 (localhost) does not run identd, sendmail gets immediately
>connection refusing when sendmail does ident query. That does not cause
>delay.

Well, it seems anyway Rob was right, because setting confTO_IDENT to
zero makes sendmail drop host resolution.

Does anybody know what can be a possible reason for these failures?

Thanks in advance
Oleg

Re: Long delay while connecting with 127.0.0.1

am 26.01.2008 19:27:02 von olv.goo

Thanks to Matanya Elchanani (http://comp.mailarchive.ca/mail.sendmail/
2000-09/1950.html). The problem was solved by recompiling sendmail
with option SENDMAIL_WITHOUT_IPV6=yes (I am using FreeBSD 6.2).

But still sendmail connects to 127.0.0.1 before sending mail !!!

Oleg

Re: Long delay while connecting with 127.0.0.1

am 26.01.2008 19:44:00 von olv.goo

So, the problem is that sendmail refuses to get mx record of the
destination host (The host where message is being delivered):

dns_getcanonname: yandex.ru
getmxrr([127.0.0.1], droplocalhost=1)
olutchen@yandex.ru... Connecting to [127.0.0.1] via relay...

here one was expected to see something like

dns_getcanonname: yandex.ru
getmxrr(yandex.ru., droplocalhost=1)
;; res_nquerydomain(yandex.ru., , 1, 15)
;; res_query(yandex.ru, 1, 15)
;; res_nmkquery(QUERY, yandex.ru, IN, MX)
;; res_send()

...........
etc.

Well, the problem is how to configure sendmail so that it could get
remote mx records correctly. Does anybody knows?

As always, thanks in advance.

olv

Re: Long delay while connecting with 127.0.0.1

am 26.01.2008 21:22:03 von Hans-Peter Sauer

olv.goo@gmail.com unleashed the infinite monkeys on 26/01/2008 18:27
producing:
> But still sendmail connects to 127.0.0.1 before sending mail !!!

That is correct - have you tried reading the documentation?

--
Rob MacGregor (BOFH)

Rule 37: "There is no 'overkill'. There is only 'open fire'
and 'I need to reload.'"

Re: Long delay while connecting with 127.0.0.1

am 26.01.2008 23:09:36 von olv.goo

Do you mean MESSAGE SUBMISSION PROGRAM in cf/README?. Yes, the msp in
submit.mc is equal to 127.0.0.1. Changing it causes sending via
another host. But one need the submission with no this intermediate
stage to the recipient mx host.

Thanks,
olv