Re: [exim] connection defer depending on load average

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mark
Date:  
À: exim-users
Sujet: 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/
>