John's suggestion of using an ACL variable along with the global rewrite doesn't work (I think that's what he tried to say himself afterwards). The address is already rewritten by the time the acl variable is set. I used this under acl_check_rcpt:

warn local_parts = ^[.]\+onbehalf\$
    set acl_c1 = foo

And then this router:

onbehalf:
    driver = redirect
    condition = ${if eq{acl_c1}{foo}}
    data = [email protected]
    unseen
    no_verify_sender

Here is the debug output of sending an email from [email protected] to [email protected]

http://pastebin.com/Je86Uvca

Note how early the global rewriting happens (first 140 lines). Also note at line 138 that it says:

>>Headers after rewriting and local additions:
...
* X-rewrote-original-recipient: [email protected]

That X- header doesn't appear to exist/be accessible in a router though.

To all more experienced Exim users: I'd expect that a sophisticated software such as Exim to have a mechanism allowing me to detect that a global rewrite took place. It can't be that there is no trace of an address being rewritten by a global rewrite, can it? (if that's the case, then I think this is a useful feature to add)

So my question is: How can I detect that a global rewrite took place somewhere after it happened (e.g. in a router)?

An answer to that would basically solve my problem.

Thanks for all the help so far,
Alex.

--
## 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/

Reply via email to