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

Pàgina inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
A: Jan-Piet Mens
CC: exim-users
Assumpte: Re: [exim] Regular expressions from file for match{
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.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}