Re: [Exim] Way to eliminate routing in queue runners?

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: Dean Brooks
CC: exim-users@exim.org
Subject: Re: [Exim] Way to eliminate routing in queue runners?
On Thu, 24 Oct 2002, Dean Brooks wrote:

> I know this may seem like an odd question, but I am curious if there
> is a way to store routing information if a message transport defers
> for later delivery.


AFAIK not.

> Specifically, we have a lot of local deliveries that get deferred
> by the appendfile transport for being over quota. Sometimes we
> have thousands and thousands on the queue.
>
> The problem is that the queue-runners are rerouting *every* single
> message, even if its the same user over and over. Not only that, but
> it reroutes every single message *before* it can even tell if the
> retry time has been reached. This appears to be the cause of most
> of our CPU load on our Exim mail servers.


The queued messages should be skipped if the retry time is not reached
yet, unless you have some configuration problem.

> Is there a way to preserve the initial routing information and only
> have the queue runners reattempt the transport delivery?


The only thing i could think of, is saving the messages to a bsmtp-file,
and running a script that checks for the quota from time to time, if the
quota is ok, reinject the messages with exim -bS.

> I realize the pitfalls of this: .forward files and other routing items
> that may have changed between the initial delivery attempt and the
> final delivery attempt will be lost, which could be confusing to the user.


That's why exim does not save the routing informations, i.e postfix saves
them, and if you had some problems with your config, or something like
this, the mail is "lost" in the queue, and will be bounced later.

> However, I'm in a situation where the CPU/disk load is a much more
> grave concern and we're willing to take the risk.
>
> Is it normal to reroute every single message on a queue run, even if
> thousands of the messages are to the same person, just to find out
> if the retry time is reached?


Like i said before, exim should NOT try to route them, if the retry time
is not reached, it will touch them and see "oh nothing to do here", but
this should be mostly done via the retry-database, not by reading every
file (IIRC).
BUT, if you run exim with -qff the queuerun will be forced, and exim will
try to deliver everything (do you run it this way?).

> I appreciate any insight into this. I scoured the spec.txt for hours
> and couldn't find anything specific.


Another way to reduce the load would be to set special retry rules for
quota-errors

*     quota         F,4h,30m; G,24h,1h,1.2; F,7d,12h


and you should use split_spool_directory in your case.

ciao