Re: [exim] Logging of redirect router in mainlog

Etusivu
Poista viesti
Vastaa
Lähettäjä: Evgeniy Berdnikov
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Logging of redirect router in mainlog
On Mon, Sep 13, 2021 at 02:19:25PM -0300, Patrick Boutilier via Exim-users wrote:
> Accept routers log to mainlog with R=<name of router> , such as:
>
> 2021-09-13 14:05:02 1mPpOA-0007aw-AX => test <test@???>
> R=mysql_autorespond_staff T=address_mysql
>
> Is there a way to get redirect routers to do the same thing?


Use "condition" option for redirect router. It should be evaluated last,
so all other options are checked as usual and control is passed to this
condition if router accepts address. Put to right side of this condition
any code for logging (${run..}, ${acl..}, etc). Example:

custom_redirect:
driver = redirect
[...]
condition = ${acl{log_router}{applied: custom_redirect}}

and in ACL section

log_router:
logwrite = Router message: \"$acl_arg1\"
message = true
--
Eugene Berdnikov