[exim] Re: Unexpected 're-routed to' in require verify = rec…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Jeremy Harris
Data:  
Para: exim-users
Asunto: [exim] Re: Unexpected 're-routed to' in require verify = recipient?
On 23/05/2023 21:01, Julian Bradfield via Exim-users wrote:
> On 2023-05-23, Julian Bradfield via Exim-users <exim-users@???> wrote:
>> So it's very unobvious what the "explicit coding" might be.
>
> Just having a quick look at the source code, what does line 415 of
> dnslookup.c (in git master) do, since ob->rewrite_headers is true?


As you found, I assume, ob->rewrite_headers comes from the
router configuration, option "rewrite_headers", which defaults
to true.


The block comment on that function says:

/* When a router wants to change the address that is being routed, it is like a
redirection. We insert a new parent of the current address to hold the original
information, and change the data in the original address, which is now the
child. The child address is put onto the addr_new chain. Pick up the local part
from the "address" field so as to get it in external form - caseful, and with
any quoting retained.

  Arguments:
   addr        the address block
   domain      the new domain
   rewrite     TRUE if headers lines are to be rewritten
   addr_new    the new address chain


The porting using the "rewrite" arg goes:

/* Rewrite header lines if requested */

  if (rewrite)
   {
   DEBUG(D_route|D_rewrite) debug_printf("rewriting header lines\n");
   for (header_line * h = header_list; h != NULL; h = h->next)
     {
     header_line *newh =
       rewrite_header(h, parent->domain, domain,
         global_rewrite_rules, rewrite_existflags, TRUE);


The "global_rewrite_rules" are (a list) developed from reading the
configuration. See
https://exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html


In summary, if the router option value is true then the global rewrite
rules are applied to the result of the DNS lookup done by the dnslookup
router.

--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/