Re: [exim] How to set up ACL whitelist & blacklist

Top Page
Delete this message
Reply to this message
Author: hanasaki
Date:  
To: LIST - Exim
Subject: Re: [exim] How to set up ACL whitelist & blacklist
The below is from script somewhere I pulled ages ago. What is the
difference between this and the lsearch you have done?

acl_whitelist_local_deny:
   accept hosts = ${if exists{CONFDIR/local_host_whitelist}\
                         {CONFDIR/local_host_whitelist}\
                         {}}


==================
On 21 Jan 2005 at 22:45, Ruth Ivimey-Cook wrote about
     "[exim] How to set up ACL whitelist ":


| I thought I would set up a facility to define a white & black lists for
| incoming mail that would otherwise fail the ACL. I want it to be keyed

on the
| incoming sender address (MAIL FROM, not mail header). I thought that:

|
| accept sender = lsearch;/etc/exim/whitelist_senders

|
| deny sender = lsearch;/etc/exim/blacklist_senders


senders =, I assume you mean?

| would do the trick. However, my simple tests using exim -bs didn't

work, so I
| guess I got something wrong. I had blacklist_senders contain:

|
| -----------------------
| ruth@???
| -----------------------

|
| and then tried exim -bs ... RCPT TO:<ruth@???>, which exim

accepted as
| ok... not what I wanted.


Maybe another typo? did you try MAIL FROM: <ruth@???>?

FWIW, I use @@lsearch for this same purpose so I can list multiple
users per domain in the file. And as opposed to an accept, I have:

    !senders    = @@lsearch;/usr/exim/sender_whitelist


in the appropriate deny. My sender_whitelist file contains lines
like:

aol.com:    a_b_s_ : Stooffixer : WillowKPR : Gsweetnova


| Note to Philip:
| Please could you be a bit more explicit in the spec.html docs section

38.12:
| "sender" exactly what the key is? I assume it is "sender@domain", but it
| doesn't say that.


Documentation gets pretty unwieldy if terms are defined every time
they are used. "sender of the message" is defined more explicitly in
section 11.1 (Terminology), which says:

The envelope contains a sender address (to which bounce messages
should be delivered), and any number of recipient addresses.
References to the sender or the recipients of a message usually mean
the addresses in the envelope.

- Fred