Create custom server side filter / plugin for mail content

I want to create a server side filter / plugin. This filter / plugin will catch emails with some predefined keywords and will redirect this email to a admin email account. Please help to get some idea to implement this feature.

Sieve scripts are server-side:

https://mailinabox.email/advanced-configuration.html#filtering