[exim] Trying to understand when $local_part_data is set in …

Top Page

Reply to this message
Author: Chris Siebenmann
To: exim-users
CC: cks
Subject: [exim] Trying to understand when $local_part_data is set in ACLs
I thought I understood how to deal with the new rules for tainted data
in Exim, but evidently I don't, and I can't figure out what is going on
from the documentation and from Internet searches.

My starting situation is that we have some simple uses of $local_part
in SMTP RCPT ACLs. We also have a big list of all valid local users in
a file. My initial understanding of the documentation was that I could
add a ACL condition of 'local_parts = /our/userlist/file' and have
$local_part_data defined in the rest of that ACL statement, because we
had successfully done a lookup on $local_part. However, this doesn't
seem to be the case. I've also tried 'lsearch;/our/userlist/file',
following some apparent recipes on the Internet, but it also resulted
in $local_part_data not being defined.

I can definitely see that the condition passes, as I'm using a test
ACL like this:

        domains = +local_domains
        local_parts = <whatever I'm testing>
        log_message = local_parts test: $local_part -- $local_part_data -- ...

When I use a straight file or a lsearch; in the 'local_parts = ...' bit,
I get log messages, and $local_part expands to what I expect it to,
but $local_part_data is blank in the log message (and elsewhere).

What am I supposed to do here? Does this require an explicit use of
${lookup}, not just a lookup in general? What ${lookup} should I
substitute here that has the same matching rules as listing a plain

 In this particular situation I can substitute a dsearch condition, and
    local_parts = ${lookup{${lc:$local_part}} dsearch {/a/directory}}
    local_parts = dsearch;/a/directory

work to set $local_part_data (for local parts that are already in the
proper case in the second one). This leaves me even more confused
about why 'lsearch;/our/userlist/file' succeeds but doesn't set

This is all on Ubuntu 20.04 with Ubuntu's version of 4.93.


    - cks