Re: [exim] Need ACL help - file doesn't exist problem

Top Page
Delete this message
Reply to this message
Author: Bill Hacker
Date:  
To: exim
Subject: Re: [exim] Need ACL help - file doesn't exist problem
Marc Perkel wrote:

> ok - need some quick ACL help. I'm writing the back end for this
> project. Here's the situation:
>
> deny    message = REJECTED - User listed in personal block list
>        condition = 
> ${lookup{$sender_address}lsearch{/etc/mailcontrol/domains/perkel.com/users/marc/blockfrom.txt}{yes}{no}} 

>
>
> The above code works of the file exists but if the file doesn't exist
> then I have problems. What I need is for it to return {no} if the file
> isn't there. How do I do that? Thanks in advance.
>


Consider making it a 'warn' instead of a 'deny', use an 'if', and have
it add a point-value to an acl_c/m variable.
'Soft' failure when an acl is not satisfied, cannot find a file.

Also allows better control of the log entries.

Then ...

One or many steps later test that value (cumulative, but weighted),
against a threshold (set in a macro OR pulled from per-user settings - a
DB, even).

By setting the value added for 'severe' faults to be above the
threshold, deny will be forced on any ONE such.

Example:

Given:

- a threshold of 'enough' (say 3 or 4). I call mine 'RUDELEVEL'

- minor RFC violations (win-mangled headers, unable to verify sender,
etc.) assigned one 'RUDENESS' point each,
AND several such accumulated can kill the connection. And/or delay n *
points (seconds/minutes)

- OR being found in a local blacklist (10 points)
- OR a 'trusted' RBL, (10 points)
- OR HELO'ing as 'us' (10 points)

will do so right away...

May not make for the fastest Exim parsing, but flexible, it is.

While you are at it... suggest using totally separate files for IP
blocking and REGEXP blocking, appropriate non-default tests for each.

Goal is to have Exim NOT do any sort of remote lookups or tests on such
IP numbers. For which it has an afffinity...

Presumption is that if you have placed them in a black (or white) list,
you don't need to waste time going 'remote' to see if they have rDNS PTR
records, resolve to a hostname, etc. Binary situation.

HTH,

Bill