[exim] lists in ACL condition

Pàgina inicial
Delete this message
Reply to this message
Autor: Michael F. Sprague
Data:  
A: exim-users
Assumpte: [exim] lists in ACL condition
I hope this is not a stupid question, but I have not been able to find the
answer after pouring over the docs for several hours.

I would like to use a custom condition in the mime and data ACLs. In short I am
doing a 'per domain' filtering setup and I also have several domain lists
defined so each domain can choose which tests to run. Handling things in the
rcpt ACL is pretty straight forward.

In the mime and/or data ACLs I'd like to also check to see if the domain for
the incoming message (I already handle limiting incoming messages to one domain
at a time) is on one or more of the domain lists. I cannot use the 'domains'
command like I can in the rcpt ACL, so I have to use the condition statement.

No biggie, but I cannot figure out the format to have condition look at a
domain list. For example, I can do this:

domains     = +eps_spf


to check to see if the recipient domain is on that list in the rcpt ACL.

I store the recipient domain in $acl_m0 so I could do the following in a mime or
data ACL to see if the recipient domain is in a db file (which seeded the domain
list earlier):

condition = ${lookup {$acl_m0} dbm{EPSEXT}{yes}{no}}

where EPSEXT is a macro. I'd rather have 'condition' look at the domain list
just in case I have need to have several db files instead of just one.

Is this even possible? If so, can someone point me in the right direction as
to the correct syntax?

More config snippets to clear things up:

# Setup marcro
EPSEXT     = /usr/local/exim/db/eps-ext.db      # Bad file extension chk


# define domainlist
domainlist eps_ext     = "dbm;EPSEXT"


# From the MIME ACL. $acl_m0 is set in the rcpt ACL to the single recipient
# domain
#
# File extension filtering.
# Only checked if domain is in +eps_ext.
# EPS TEST 5
accept condition = ${lookup {$acl_m0} dbm{EPSEXT}{no}{yes}}

deny   set acl_m1  = ${extract{-1}{.}{lc:$mime_filename}}}
       condition   = ${if match{$acl_m1}\
                               {\N^(bat|cmd|com|dll|exe|hta|js|jse|lnk|pif|shs|\                                    scr|vbe|vbs|wsf|wsh)$\N}\
                               {1}{0}}
       message     = Blacklisted file extension detected ($mime_filename)
       log_message = [EXT $acl_m0] $mime_filename


thanks,
mikeS

-- 
Michael Sprague  | mfs@???
Partner          | System and Network Engineering (SaNE), LLC
use STD::disclaimer;