Re: connection timeout variable name?



In article <87y7bons0w@xxxxxxxxxxxxxxxxxxxxxx>, Andrzej Adam Filip wrote:
Mike <mikee@xxxxxxxxxxxx> writes:

In article <87k5n8cqjt@xxxxxxxxxxxxxxxxxxxxxxxx>, Andrzej Adam Filip wrote:
Mike <mikee@xxxxxxxxxxxx> writes:

In article <877ij9bl5s@xxxxxxxxxxxxxxxxxxxxxxxxx>, Andrzej Adam Filip wrote:
Mike <mikee@xxxxxxxxxxxx> writes:

Is there a variable I can set in sendmail.mc that will
force a limit to how long sendmail waits when processing
the outbound queue and connecting to a remote host? Seems
like my sendmail processes/children are waiting a very
long time trying to send messages on the outbound queue,
and it seems like I'm getting a lot of child processes
because of waiting for this eventual timeout.

I do not mean the timout when a remote server is sending
email to a local user. I do mean a timeout when sendmail
is processing the queue (/var/spool/mqueue) to send messages
to remote servers and users.

1) Take a look at Timeout.connect and Timeout.iconnect
2) Consider using hoststatus to skip for some time repeated delivery
attempts to "unresponsive" hosts

http://www.sendmail.org/m4/tweaking_config.html#confTO_CONNECT
http://www.sendmail.org/m4/tweaking_config.html#confHOST_STATUS_DIRECTORY

What I added yesterday is:

dnl mikee 071219 begin
define(`confTO_ICONNECT', `1m')dnl
define(`confTO_CONNECT', `5m')dnl
define(`confTO_ACONNECT', `5m')dnl
define(`confTO_HELO', `5m')dnl
dnl mikee 071219 end

I have previously added:

dnl mikee 071218 begin
define(`confMAX_RUNNERS_PER_QUEUE', 1)dnl
define(`confMAX_QUEUE_CHILDREN', 40)dnl
define(`confHOST_STATUS_DIRECTORY', `/var/spool/mqueue/.hoststatus')dnl
define(`confTO_HOSTSTATUS', `30m')dnl
dnl mikee 071218 end

Does /var/spool/mqueue/.hoststatus exists in file system?
[ it is a pretty common "omission" ]

I know I have some issues with my configuration. I have plans to fix
those issues by adding another box and shifting some things around.
What I want at the moment is for sendmail when processing the queue
to try to send a message, time out quickly (1-2 minutes), move to the
next message, and not fork massive amounts of sub processes while
doing this.

To monitor this box I have recently been using:

# mailq | tail ; ps -ef | grep -c sendmail ; uptime
lBK5c6a4021724 12692 Wed Dec 19 23:38 MAILER-DAEMON
(Deferred: 450-4.2.1 The Gmail user you are trying to contact)
<jqyay@xxxxxxxxxxxxxx>
lBK5k7T0022365 12868 Wed Dec 19 23:46 MAILER-DAEMON
(Deferred: 450-4.2.1 The Gmail user you are trying to contact)
<jqyay@xxxxxxxxxxxxxx>
lBK5RitR021269 8806 Wed Dec 19 23:27 MAILER-DAEMON
(Deferred: Connection refused by punjab.com.)
<Paskert.Bekker@xxxxxxxxxx>
Total requests: 597
184
17:19:46 up 12 days, 9:45, 21 users, load average: 1.02, 1.07, 1.12

There are 597 messages in my queue and 184 processes running that queue.
That's way too many processes for me. I suppose I could live with
30 or 40 when there are lots of messages in the queue, but not this
many. My preference is to have maybe 5 to 10 processes. I have processes
from yesterday that are just sitting there trying to send a message
even though I added the timeouts above and restarted sendmail afterwards.

Am I using the wrong timeout or wrong time out value?

1) You may consider using separate queue groups for top few
destinations.
http://www.sendmail.org/m4/features.html#queuegroup
2) Some smaller sites may use their ISP mail server as "fall-back relay"
after trying direct delivery first


Are my connect values not correct?

They are good as the first step in improvements by iteration.

Why does my sendmail not timeout quickly?

Do you say it tries to connect for longer time than you specified?

How do I configure my sendmail for the 'fall-back relay' through my
ISP?

One option is to define custom "default route" using
FEATURE(`mailertable').

mailertable file (requires compilation with makemap):
# default route with fallback
. esmtp:%1:fall-back_relay
# direct delivery only for sub-domains of example.net
.example.net esmtp:%1%0
# delivery with fallback for alfa.example.net
alfa.example.net esmtp:%0:fall-back_relay

Sendmail offers such "fall-back" via its global options but I personally
suggest using mailertable as it provides better "per domain"
flexibility.

http://www.sendmail.org/m4/tweaking_config.html
confFALLBACK_MX [ AFAIR sendmail-8.12.11+ has added a few extras]

I'll look at the fall-back links and configuration, thanks.

There are some messages where sendmail seems to never time out. The
process is stuck trying to deliver even after four hours. I think I
still have a configuration issue, though at times it looks like a
DNS issue. I've not changed the DNS setup recently. I have an both
internal and external DNS. My internal DNS has all my internal machines
and can query externally (i.e. ftp ftp.uu.net resolves, etc). My
external DNS is hosted by my ISP and only has those records needed
on the outside to reach me (MX, A, CNAME for stuff like vpn, etc).

I want to see sendmail really timeout on those domains it can't
contact. Sendmail is not incrementing the 'N' entry in the qf* file
for attempting to deliver... the process just hangs.

Mike

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • MTU PPP
    ... I would like to set the MTU of my ppp0 above 1500. ... sendmail ... Smart relay host in sendmail ... # checkpoint queue runs after every N successful deliveries ...
    (RedHat)
  • Re: connection timeout variable name?
    ... force a limit to how long sendmail waits when processing ... long time trying to send messages on the outbound queue, ... because of waiting for this eventual timeout. ... I do not mean the timout when a remote server is sending ...
    (comp.mail.sendmail)
  • Re: /etc/resolv.conf and sendmail
    ... den 13.07.2004 schrieb Philippe um 12:07: ... Given that you did not change the basic setup of Sendmail on Fedora, ... Sendmail will only queue the mail for outgoing if it can't find a way ... your DNS is broken or you have a strange firewalling. ...
    (Fedora)
  • Re: Sending many e-mails
    ... what you are wanting to do is a fair bit out side of the scope of normal mailing list management software. ... a process of sendmail for each mail sent, but I don't see any way to avoid that method when using sendmail. ... will be far better off streaming the messages from your program that generates the individual messages in to Sendmail and have it queue the messages and let its queue scheduling empty the queue for you. ...
    (comp.mail.sendmail)
  • Re: Sendmail Resolver Issue?
    ... a gotcha with linux and sendmail. ... Probably not a problem in this case since you want to use DNS. ... Run mailq to fine a queue ID of a message sitting in the queue. ...
    (comp.mail.sendmail)