Re: [Exim] Exim usage dependent on time of day

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Alain Williams
CC: exim-users
Subject: Re: [Exim] Exim usage dependent on time of day
On Wed, 14 Feb 2001, Alain Williams wrote:

> The point is that the limited resource is the network bandwidth from the site, not
> the load on the machine (which does nothing else than mail delivery).


Ah. There's always something I forget about.

In Exim 4 it will be easier to delay certain deliveries till the night.
In Exim 3, there are various games you can play:

. set queue_remote_domains to stop immediate remote delivery for those
domains that are off-site.

. start a queue runner every 1m (say) using exim -bd -q1m

. set queue_run_max = 1

. leave remote_max_parallel at its default value (1)

That means you will almost always have 1 queue runner running,
delivering one message to a remote host (if there is mail to be
delivered, of course). So your "remote queue" will be serialized to one
delivery at a time.

Then set up two cron jobs:

. at the start of the "night", run exim -q15m (no -bd) with no limit on the
number of queue runners. This starts another daemon that does NOT listen
for incoming messages, but just starts queue runners. The easiest way to
change the config for this daemon is to use a macro in the config:

QUEUE_RUN_MAX=1
queue_run_max = QUEUE_RUN_MAX

Then, as root, start this extra daemon with exim -DQUEUE_RUN_MAX=10 -q15m
so that it will run up to 10 queue runners (say) if some of them take a
long time to complete.

. at the end of the "night", kill off this additional daemon. You'll
find its pid in /var/spool/exim, so the whole thing can be automated.

This is off the top of my head. I have no idea if it will do exactly
what you want, but perhaps it will give you some ideas.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.