[exim] Reduce & inlist

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Slavko
Datum:  
To: exim ML
Betreff: [exim] Reduce & inlist
Hi all,

i found in ML archives recipe how to remove duplicates from list,
i tried it in that form in file used -be input:

    APPEND_ITEM = ${if def:value {$value,$item}{$item}}
    INLIST = inlist{$item}{<,$value}


    ${reduce{<, item1, item2, item1}\
              {}\
              {${if INLIST{$value}{APPEND_ITEM}}}}


It works in 4.94, but doesn't work in 4.96 nor 4.97 (all stock debian
packages). In the 4.96 & 97 it returns only "item1". From debug
output and docs i understand, that when item is in list, the $value
inside inlist contains matched item not that one from reduce, thus
that matched item replaces result in reduces..

I found some discussion about that in this thread
https://lists.exim.org/lurker/message/20220922.124818.33ca8de7.es.html
but i lost in it...

Then i want to replace inlist by forany, but here is collision with $item
values, thus i didn't try it. Finally i replaced inlist with match condition,
which works, but i would to awoid regex if possible .

Please, is here better way to remove duplicates than use regex
in condition?

regards

--
Slavko
https://www.slavino.sk/

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/