The place to look for creating extra transaction rules is AcceptMultiChainTransaction().
If you're willing to work with MultiChain 2.0 (in alpha but stable as far as we know) you could take a look at the custom source code directly which allows you to add your rules in a predefined place using C/C++ compiled into the binary. (We can also help with this on a commercial basis.) Once filters are implemented you should be able to write these rules at the application level in a high-level language like Javascript.