Re: [exim] connection defer depending on load average

Top Page
Delete this message
Reply to this message
Author: Mark
Date:  
To: exim-users
Subject: Re: [exim] connection defer depending on load average
On Tue, 17 Jul 2007, Marten Lehmann wrote:

> Hello,
>
> how can I defer connections (giving a 4xx error) to our smtp server depending
> on the system load?


Hi,

$load_average contains the system load average multiplied by 1000.

You could put something like the following in your acl_smtp_connect to
defer when the load goes over e.g. 4.

defer
condition = ${if >{$load_average}{4000} {true}{false}}
message = Service temporarily unavailable, try again later.

Regards,
Mark.

> I currently have an option that only queues messages instead of delivering
> them immediately, but this causes more pain than it helps, because while
> mailboxes exceeding their limit would just cause a 5xx error at smtp time on
> any new message, now cause a bounce per message.
>
> Regards
> Marten
>
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
>