Re: [Exim] Regex problem

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: William Thompson
Dátum:  
Címzett: ODHIAMBO G. Washington, exim-users
Tárgy: Re: [Exim] Regex problem
> # Please, don't teergrube people you relay for you or your own MXes :-)
>
> I am looking at SA-Exim and this regex for SAteergrubecond.
>
> I would like to speficy my sender_host_addresse using netblocks.
> How do I rewrite this so that the condition expands to true only
> if the sender_host_address is not within any of the THREE netblocks of
> a.b.c.d/25 and w.x.y.z/25 and 1.2.3.4/24 ??
>
>
> ${if and { {!eq {$sender_host_address} {a.b.c.d/24}} \
>            {!eq {$sender_host_address} {w.x.y.z/24}} \
>            {!eq {$sender_host_address} {1.2.3.4/24}} \
>          }{1}{0}}


Use ${mask:$sender_host_address/24} instead of $sender_host_address

Something like:
${if and { {!eq {${mask:$sender_host_address/24}} {a.b.c.d/24}} \
           {!eq {${mask:$sender_host_address/24}} {w.x.y.z/24}} \
           {!eq {${mask:$sender_host_address/24}} {1.2.3.4/24}} \
         }{1}{0}}


> There is something I am missing in between. A 'third eye' is welcome.