If I try Tony's redirect router solution:
my_bounce:
driver = redirect
domains = mydomain.tld
senders = :
data = ${if and{{ def:$authenticated_id } \
{ !eq{$local_part}{$authenticated_id} }}
\
{:fail: Forged bounce address} }
allow_fail
retry_use_local_part
I get errors like:
"variable name omitted after "def:" inside "and{...}" condition"
in the mainlog.
How can I fix it?