[exim] Confusion about list search types

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Bob Johnson
Date:  
À: exim-users
Sujet: [exim] Confusion about list search types
I am confused about various list comparisons and searches. Some things
aren't a problem, but others don't do what I expect, and neither the Exim 4
book nor online spec have enlightened me (I assume I've missed a critical
paragraph somewhere).

Assume host_lookup = * for all of these, and I'm using Exim 4.60.


First, the easy one:

accept    hosts = +relay_from_hosts


This, of course, works, but I'm not sure I understand what it is doing
internally. Am I correct in believing the hosts condition is comparing the
known IP number of the connected host to the IP numbers of the hosts listed
in relay_from_hosts, doing DNS lookup to find the IP numbers if necessary?


Now, if I do the following in an RCPT ACL:

accept hosts = lsearch;/exim/whitelisted-hosts

what happens if whitelisted-hosts is a list of fully qualified DNS names?
Does it look those names up in DNS and find their IP numbers to compare to
the connected host's IP number (which is what the Exim 4 book seems to be
telling me)? Or does it do a reverse lookup of the connected host to find a
name to compare to the names in the list? This test seems to sometimes work
and sometimes not, and I'm particularly confused on this one.


The next one (again in an RCPT ACL) is

accept hosts = iplsearch;/exim/whitelisted-IPs

where whitelisted-IPs is file containing a list of IP numbers. I expected
this to compare the IP number of the connected host to the IP numbers in
the file, in an intelligent way that understands netmasks, etc. Instead, I
get a warning that I need to use net-iplsearch for this. Why must I use
net-iplsearch instead of just iplsearch? net-iplsearch does what I want,
but I don't understand why I need it.


Finally, if I use one of the above in something like:

accept  set acl_m0 = Message arriving from a trusted host.
        hosts = lsearch;/exim/whitelisted-hosts


Does acl_m0 always end up with the text message assigned to it, or does it
only get the assignment if the hosts condition is true and results
in "accepted"? What if I change the order of the "set" and "hosts" lines?


Thanks,

- Bob