Mailing List Archive

Searching address in a "partial" list
Hi all!

I need to check if the given address is in a "block list".
The problem is, that the list can contains part of addresses, too, eg:

test@tester.de
test
tester.de

so that a lookup for blah@tester.de must match.
I really don't know how to do that. Any suggestion?

I found that:

condition = ${if
match{$acl_m_fromad}{/etc/exim4/lists/block.senders}{yes}{no}}

but it does not work... :(

Can someone help me?

Thanks
Luca Bertoncello
(lucabert@lucabert.de)

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Searching address in a "partial" list [ In reply to ]
On 19/04/2021 08:27, Luca Bertoncello via Exim-users wrote:
> I need to check if the given address is in a "block list".
> The problem is, that the list can contains part of addresses, too, eg:
>
> test@tester.de
> test
> tester.de
>
> so that a lookup for blah@tester.de must match.

Are you allowed to (mass-) edit this file before use?
You could turn the lines into RE's and use nwildlsearch:

^test@tester\.de
^test
^tester\.de

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Searching address in a "partial" list [ In reply to ]
Am 19.04.2021 10:40, schrieb Jeremy Harris via Exim-users:

Hi Jeremy

> Are you allowed to (mass-) edit this file before use?
> You could turn the lines into RE's and use nwildlsearch:
>
> ^test@tester\.de
> ^test
> ^tester\.de

Unfortunately not, since the file must be used for other checks, too...
But I found a solution:

${if match_address{$acl_m_fromad}{+blocked_senders}{yes}{no}}

acl_m_fromad is a variable with the adress taken from Header FROM.
It works... ;)

Regards
Luca Bertoncello
(lucabert@lucabert.de)

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/