Re: [Exim] Exim version 4.14

Top Page
Delete this message
Reply to this message
Author: Rick Ennis
Date:  
To: Philip Hazel
CC: Nico Erfurth, exim-users
Subject: Re: [Exim] Exim version 4.14
> > 1) I tried setting
> > address_data = $local_part
> > in my router that's doing the verify. But I didn't have much luck with
> > expand_string("$address_data") in local_scan.
>
> That's because $address_data is cleared at the end of the ACL (because
> it's a per-recipient thing, and there may be multiple recipients).
>
> > 2) I tried the same thing as #1 above, but added
> > warn set acl_m1 = $address_data
> > in an acl immediately after my verify = recipient.
> > I then used expand_string("$acl_m1") in local_scan and still didn't get

what
> > I wanted.
>
> At first sight, I would have expected that to work.


Well I've noticed that the second configuration there does work, part of the
time. It works provided the message is addressed to a local part that is my
actual user name. If, on the other hand, it's addressed to an alias, which
would match one of my redirect routers, then the expand_string("$acl_m1")
ends up being blank. Here are the two routers that I think would come into
play...

virtual_aliases:
driver = redirect
allow_defer
allow_fail
data = ${lookup{$local_part}lsearch{ETC_PATH/$domain/aliases}}
domains = ETC_PATH/virtual_domains
file_transport = address_file
pipe_transport = address_pipe
retry_use_local_part

local_user:
driver = accept
check_local_user
headers_remove = disposition-notification-to:return-receipt-to
transport = local_delivery
address_data = $local_part

So when a message is sent (for example) to ennis@ (which is my actual user
name), it just hits the local_user router and local_scan gets the data. But
when something is sent to rge1@ it hits the virtual_aliases router. After
that the new address that's generated (again my actual user name) still
still has to go through the local_user router. So shouldn't that still
work? The mail gets delivered correctly, but for some reason I get a blank
value for acl_m1 in local_scan.


> > Is there a standard solution to this one? There must be a way to get at

the
> > routed address from within local_scan b/c the verifying stage has to

have
> > already completed. Am I just being dense?
>
> Well, the list of recipients is available to local_scan()...


True. It's just that (in my example) if the message is addressed to rge1@
then I won't be able to check anything in the user's home directory for use
in my scanning decision b/c I won't know which user that really is.