Re: [exim] Logging of redirect router in mainlog

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Patrick Boutilier
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Logging of redirect router in mainlog
On 9/13/21 4:19 PM, Evgeniy Berdnikov via Exim-users wrote:
> 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

>



Thanks, that works well. Just needed accept in the acl.

log_router:
   accept
      logwrite = Router message: \"$acl_arg1\"
      message = true

begin:vcard
fn:Patrick Boutilier
n:Boutilier;Patrick
org:;Nova Scotia Department of Education
adr:;;2021 Brunswick Street;Halifax;NS;B3K 2Y5;Canada
email;internet:boutilpj@???
title:WAN Communications Specialist
tel;work:902-424-6800
tel;fax:902-424-0874
version:2.1
end:vcard