My current mail system is sendmail 8.8.8. with nearly 12K users running on a
Ultra Sparc-1 at 128 MHz and 448MB of RAM, the overall performance of the
system is very good, but sometimes (at peak hours) there are a lot of
sendmail processes delivering mail everywhere and the system resources get
shortened.
I know that a solution is to change my current delivery mode to 'queued'
or 'deferred', but I'd like to keep local mail delivered immediately.
I've considered something like queue runs every 5 minutes for the local
mail (/usr/lib/sendmail -qRcolomsat.net.co) but that is not as good as
I'd like, because mail with multiple destinations involving local and
remote addresses slows down the queue runs.
So, here is my question:
Is there a way to make the smtp daemon (/usr/lib/sendmail -bd) to
deliver interactively all local mail and queue everything else?
Even better, could it be possible to specify all the "fast delivery hosts"
(local, virtual hosts in the same machine or other hosts on my local
network) in a file to do this?
I've already read the bat book and I couldn't find something helpful.
Thanks for your comments.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>My current mail system is sendmail 8.8.8. with nearly 12K users running on a
>Ultra Sparc-1 at 128 MHz and 448MB of RAM, the overall performance of the
>system is very good, but sometimes (at peak hours) there are a lot of
>sendmail processes delivering mail everywhere and the system resources get
>shortened.
>I know that a solution is to change my current delivery mode to 'queued'
>or 'deferred', but I'd like to keep local mail delivered immediately.
>I've considered something like queue runs every 5 minutes for the local
>mail (/usr/lib/sendmail -qRcolomsat.net.co) but that is not as good as
>I'd like, because mail with multiple destinations involving local and
>remote addresses slows down the queue runs.
I am currently using:
sendmail -bd -q5m -odq
so that there are queue runs every 5 minutes, but arriving email is
queued on arrival. For outbound mail, I do leave the default
delivery mode, so that it goes out quickly. It is hard to change
that, for some user agents specify the delivery mode on their command
line.
At present, much of the outbound mail actually originates on Window
clients, so is received with smtp, and goes into the queue until the
next queue run.
In my experience, users do not notice the delay of up to 5 minutes.
As an alternative, I tried 'sendmail -bd -q1h -odi'. This should
deliver immediately, without forking off a child process. Doing this
allows one to control the number of sendmail processes with
MaxDaemonChildren. My users immediately noticed the change. The
effect was that, submitting mail from a windows email client, the
client hung for a while after apparently sending the mail. I have
switched back to queueing all incoming mail with 5 minute queue runs
and my users are happy again. I also configure MinQueueAge=56m, so
that messages are only retried about once per hour.
>So, here is my question:
>Is there a way to make the smtp daemon (/usr/lib/sendmail -bd) to
>deliver interactively all local mail and queue everything else?
>Even better, could it be possible to specify all the "fast delivery hosts"
>(local, virtual hosts in the same machine or other hosts on my local
>network) in a file to do this?
You could mark all mailers expensive, other than the local mailer.
Then configure the option HoldExpensive=True, so that these are not
sent. I tried this, but did not like it.
The trouble is that some messages will have both a local recipient
and a remote recipient. The local recipient will receive the mail
immediately. Then the queue file will be marked as having been
used. The other recipients will have to wait for the MinQueueAge
before they are even tried for the first time. I went back to
straight queuing, whereby all recipients are tried within about 5
minutes, and my users don't complain.
You could try using the e (expensive) flag on the smtp mailers and then
using the option of HoldExpensive=True, so those mails will only be delivered
when yo do a queue run.
So, with M4 config do:
define(`confCON_EXPENSIVE', True)dnl
define(SMTP_MAILER_FLAGS,e)dnl
And then use a crontab or something to make a queue run on regular intervals.
----
/Johan Sultan
johan....@bigfoot.com
> ca...@colomsat.net.co writes:
>
> >My current mail system is sendmail 8.8.8. with nearly 12K users running on a
> >Ultra Sparc-1 at 128 MHz and 448MB of RAM, the overall performance of the
> >system is very good, but sometimes (at peak hours) there are a lot of
> >sendmail processes delivering mail everywhere and the system resources get
> >shortened.
>
> >I know that a solution is to change my current delivery mode to 'queued'
> >or 'deferred', but I'd like to keep local mail delivered immediately.
>
> >I've considered something like queue runs every 5 minutes for the local
> >mail (/usr/lib/sendmail -qRcolomsat.net.co) but that is not as good as
> >I'd like, because mail with multiple destinations involving local and
> >remote addresses slows down the queue runs.
>
> I am currently using:
>
> sendmail -bd -q5m -odq
> [..]
Add also MinQueueAge to avoid resending email for
down sites at every queue run.
e.g.:
sendmail -bd -q5m -odq -O MinQueueAge=30m
--
"Andrzej (Andrew) A. Filip" <an...@polbox.com>
Warsaw, Poland
an...@bigfoot.com (backup)
You could specify a slow and fast smtp mailer that differed in the e
flag and then use mailer table to differentiate between them. You can
also do this more or less automatically by setting:
define(`confTO_CONNECT', 2m)dnl Connection timeout
define(`confTO_ICONNECT', 45s)dnl Initial connection timeout
or you can be even tighter if you wish, you then run a script every hour
or so that runs sendmail with longer than normal values though also with
a lower QueueLA.
You probably also want to run difficult mails less often:
define(`confMIN_QUEUE_AGE', `25m')dnl
and be less ambitious with each queue run:
define(`confMAX_QUEUE_RUN_SIZE', 25)dnl
You can reduce the ammount of work that sendmail does with:
define(`confCHECKPOINT_INTERVAL', 25)dnl Write to qf file every
25 rcpt
that can mean that more people get 2 copies of the mail if sendmail
crashes.
You can also turn off ident so that sendmail doesn't wait for it:
define(`confTO_IDENT', 0)dnl Turn off ident protocol
Playing with nscd.conf can also help you, particularly if you use pop.
/Michael
--
This space intentionally left non-blank.