Re: [exim-dev] Authenticated_id and redirect condition

Top Page
Delete this message
Reply to this message
Author: Leszek Dubiel
Date:  
To: exim-dev
Subject: Re: [exim-dev] Authenticated_id and redirect condition

>> Finally I have discovered, that problem disappears, when repeat_use is
>> set to false. Setting check_ancestor as true doesn't help. So problem
>> with headers adding/removing seems to be valid only when router is
>> unseen and when it redirects to the same $local_part.
>>
>
> I am glad you have found a way round it. It is probably caused by this
> feature, that is documented:
>
> Warning 2: If the unseen option is set on the router, all header
> additions are deleted when the address is passed on to subsequent
> routers.
>

Hmmmm.... Maybe I don't understand routing well, but when address passes
unseen router "copysend" (config below) then it gets redirected. Then
address goes through copysend again, and is redirected to kowalski
again. Then address starts from the beginning, and so on... But exim
somehow stops that loop, and mail to kowalski gets deliverd, but headers
are untouched.

If I put repeat_use false then router copysend works only once and mail
gets delivered immediately to user mailbox.



ERRORNEUS CONFIG:

copysend:
driver = redirect
data = ${if eq{$authenticated_id}{nowak} {kowalski} }
headers_remove = Subject
headers_add = Subject: authenticated_id is $authenticated_id...
unseen = yes

user:
driver = redirect
check_local_user
group = mail
data = /var/mail/$local_part
file_transport = to_file




PROPER SOLUTION:

copysend:
driver = redirect
data = ${if eq{$authenticated_id}{nowak} {kowalski} }
repeat_use = false
headers_remove = Subject
headers_add = Subject: authenticated_id is $authenticated_id...
unseen = yes

user:
driver = redirect
check_local_user
group = mail
data = /var/mail/$local_part
file_transport = to_file