sendmail, local delivery 

I'm behind a gateway that is not up all the time. I setup my box using static local IP, so whenever the gateway is up, I'm ready to surf.

However, I notice that whenever the gateway is not up, my sendmail is extremely slow, a

date | /usr/sbin/sendmail -v $USER

takes over 40 seconds to deliver — about 30 seconds for these first two ling to show up:

tong... Connecting to localhost.localdomain. via relay...
220 localhost.localdomain ESMTP Sendmail 8.12.5/8.12.5; Fri, 14 Mar 2003 12:42:32 -0500

Further more,

date | /usr/sbin/sendmail -v -f sender@some.domain.org $USER

takes much more longer:

[...]

Tong

sendmail, local delivery 

From faq:

http://www.sendmail.org/faq/faq.txt

Q3.12 — Why do connections to the SMTP port take such a long time?

set the IDENT timeout to zero:

Example 3. Changes to /etc/mail/submit.cf

-#O Timeout.ident=5s
+O Timeout.ident=0

Tong