[Exim] redirect router issue with aliases

Pàgina inicial
Delete this message
Reply to this message
Autor: Bruce Cornett
Data:  
A: exim-users
Assumpte: [Exim] redirect router issue with aliases
Hello

I am attempting to use a redirect router to send UCE to a specific mailbox
for each user and send a copy back to the sender. I have managed to make
it work more or less as expected by rewriting the recipient as
pex.$original_local_part@$original_domain (I have not yet tested what
happens with multiple recipients).

However, whenever the recipient is in the local /etc/aliases it fails.

For example - I can send mail to the aliased pex.bcornett@??? with
no problem. But if I redirect to that same address it fails with:
 >>  pex.bcornett@???
 >>    (ultimately generated from bcornett@???)
 >>    Unrouteable address


I wonder if I am tripping over a known issue with aliases that I am
overlooking. Or maybe my whole approach is bogus.

I am using the latest exim-heavy from debian unstable that includes the
exiscan patch. At first I thought this was the patch, but at this point I
am hard coding the redirect address and it still fails. This fragment sets
the redirect_router to my alias router, but the response is the same,
regardless which router I point to. We have been snowed in this weekend
and I am pretty sure I have tried every possible combination of routers.

The relevant routers are below - any insight would be appreciated.

Bruce C

scan_redirect:
      driver = redirect
      condition = ${if def:h_X-Redirect-To: {1}{0}}
      headers_add = X-Redirect: pex.$original_local_part@$original_domain
      #data = $h_X-Redirect:
      data = pex.bcornett@???
      #headers_remove = X-Redirect-To
      redirect_router = system_aliases
    # no_verify
    # unseen


system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
file_transport = address_file
pipe_transport = address_pipe
# condition = ${if eq {$domain}{$primary_hostname} {yes}{no} }