Re: [exim] Trying to understand when $local_part_data is set in ACLs

2020-11-10 Thread Andreas Metzler via Exim-users
On 2020-11-09 Chris Siebenmann via Exim-users  wrote:
[...]

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

I would suggest to upgrade to 4.94 + fixes and would keep away from
anything > 4.92 and < 4.94+fixes.

A quick tests on Debian testing works as expected:

  warn local_parts = ametzler
   log_message = local_parts test: $local_part -- $local_part_data

2020-11-10 14:28:21 H=localhost () [::1] Warning: local_parts test: 
ametzler -- ametzler

cu Andreas

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


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

2020-11-09 Thread Chris Siebenmann via Exim-users
 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:

warn
domains = +local_domains
local_parts = 
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
file?

 In this particular situation I can substitute a dsearch condition, and
both
local_parts = ${lookup{${lc:$local_part}} dsearch {/a/directory}}
and
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
$local_part_data.

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

 Thanks.

- cks

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/