Re: [exim] selecting random ip from file

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Arkadiusz Miśkiewicz
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] selecting random ip from file
W dniu 12.05.2021 o 11:42, Jeremy Harris via Exim-users pisze:
> On 12/05/2021 10:11, Arkadiusz Miśkiewicz via Exim-users wrote:
>> example.com: 1.1.1.1, 2.2.2.2, 3.3.3.3
>>
>> The number of ip addresses can be different for each domain listed there.
>>
>> How to approach this in exim way?
>
> expansions:
>
> listcount
> randint
> eval
> listextract
>


Thanks for hints, were helpful

${listextract{${eval:${randint:${listcount:<, ${lookup{example.com}
nwildlsearch{/tmp/x}}}} + 1} }{<, ${lookup{example.com}
nwildlsearch{/tmp/x}}}}


--
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )