Dynamic Return Path

That is not how SMTP is designed to work. The return path is where out of band bounces are to be delivered. The typical bulk sender does not want bounces to go to the from address, they want to collect them at the return path. That said, this can be done, you’ll need to manipulate things in Lua by rewriting the message. I appreciate that your org requires this, but we don’t generally provide help doing things the wrong way, especially not for free.

Okay, I understand that.

One more thing you could guide me in this? I want to have two pools. Mails will be sent from pool-1 if they are being delivered to @outlook and pool-2 if they are being delivered to any other ESPs. I have defined both in the sources.toml but how to add tenants (in queues.toml) as such both are picked at once not only the default-tenant.

That will require you to write Lua to that effect, it cannot be done with the queues helper.

How can I define this in init.lua as such that it considers both pools?

See Configuring Sending IPs - KumoMTA Docs and add the logic to make the decisions.