Re: [exim] Regular expressions from file for match{

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marc Perkel
Dátum:  
Címzett: exim-users
CC: Jan-Piet Mens
Tárgy: Re: [exim] Regular expressions from file for match{


Tony Finch wrote:
> On Mon, 16 Jan 2006, Jan-Piet Mens wrote:
>
>> Is it possible have a single condition retrieve a list of RE to be matched
>> from a file?
>>
>
> Use nwildlsearch. For example,
>
>   deny
>     set acl_m0 = ${lookup {$mime_filename} \
>                    nwildlsearch {/etc/exim/mime_regexes} }
>     condition = ${if !={$acl_m0}{} }
>     message = This message contains a prohibited attachment filename ($mime_filename) because $acl_m0
>     log_message = DENY: attachment filename ($mime_filename) because $acl_m0

>
> The file contains entries like
>
> ^.*\.exe    executable files are dangerous in email
> ^.*\.scr    screensavers are dangerous in email
> ^.*\s{10}    it is a possible file type hiding attack
> ^.{50}        it is excessively long

>
> Tony.
>

Should post that example to the wiki.