[Rspamd-Users] Map of IPs in CIDR notation but with exceptions?

Michael Grimm trashcan at ellael.org
Sun Apr 21 09:21:15 UTC 2024


Alexander Moisseev via Users <users at lists.rspamd.com> wrote:
> 
> On 20.04.2024 22:23, Michael Grimm via Users wrote:

>> I wonder if there is a way to define a map of IPs like:
>> All 10.1.1.0/24 but not 10.1.1.222?
>> Tests like …
>> 10.1.1.0/24,!10.1.1.222
>> 10.1.1.0/24,-10.1.1.222
>> … failed with "invalid IP address: !10.1.1.222" and "invalid IP address: -10.1.1.222"
>> Is there a way to achieve this?
> 
> You can use conditional maps: https://rspamd.com/doc/modules/multimap.html#conditional-maps
> Example: https://github.com/moisseev/rspamd-multimap-bl/blob/9608a091b9f4ad9f353ee8f061ea0fd43e6685ba/local.d/multimap.conf#L9

Thanks, that was what I was looking for and didn't find ;-)

Regards,
Michael



More information about the Users mailing list