[exim-dev] regex iteration

Top Page
Delete this message
Reply to this message
Author: David Saez Padros
Date:  
To: exim-dev
Subject: [exim-dev] regex iteration
Hi !!

I'm thinking about adding a new function to exim that given a
string, a regexp and one acl name will call the acl as many times
as the regexp is found in the string setting a special variable
with the matched string, something like:

${acl_match {regexp}{string}{acl_name}}

this will return true if all the calls to acl return accept,
false if any call to the acl returns deny or it will defer if
any call to the acl returns defer.

It could be useful to check all ip's in the headers, to check
url's in message body or to do some other kinds of 'iteration', ie:

deny condition = ${acl_match {\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]}\
         {$message_headers}{acl_check_ip}}
      message   = Message passed through blacklisted ip


and then

acl_check_ip:

    deny    dnslists = virbl.dnsbl.bit.nl2/$matched_string
    accept


--
Thanx & best regards ...

----------------------------------------------------------------
    David Saez Padros                http://www.ols.es
    On-Line Services 2000 S.L.       e-mail  david@???
    Pintor Vayreda 1                 telf    +34 902 50 29 75
    08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------