Re: [exim] randomize spamscanning- and av-IPs?

Góra strony
Delete this message
Reply to this message
Autor: Warren Baker
Data:  
Dla: Niels Kobschätzki
CC: exim users
Temat: Re: [exim] randomize spamscanning- and av-IPs?
On Wed, May 19, 2021 at 9:14 AM Niels Kobschätzki via Exim-users <
exim-users@???> wrote:

> Hi,
>
> it is possible to add multiple IPs to the av_scanner- and the
> spamd_address-settings like this:
> spamd_address = 10.10.10.10 783 : 11.11.11.11 783 : 12.12.12.12 783
>
> It seems that the machines always try first 10.10.10.10, then 11.11.11.11
> and then 12.12.12.12
> I know that I can give priorities via 10.10.10.10 783 pri=10 for example.
> But is there a way to randomize how the spam-servers are tried? I have one
> machine that has always a very high load and the other machines are a bit
> bored. I could configure another order for each of my mail-servers by hand,
> but if there would be built-in randomization it would make things easier.
>



As mentioned by Peter, based on the docs and the weight= option, it should
be randomized but not sure if a weight has to be explicitly declared for
randomization to kick in.
Alternatively, spamd_address is expanded so you could stick the servers IPs
in a file and make use of ${randint:n} with a lookup. ${lookup
{${randint:3}} lsearch{/path/to/file}}

where the file contains:

0: 10.10.10.10 783
1: 11.11.11.11 783
etc.


--
.warren