If by filter email based on message text - you mean by text located in the body of the email, I think this is what you need to consider. Go to -> https://pm-doc.sourceforge.net/doc/ and look for this section:
5.2 Flags HB at top of recipe (warning)
[Philip] Version 3.22 has a bug that keeps the 'H' flag from being cleared, such that once you use it, it never gets cleared. Using the 'H' flag will therefore cause problems with latter recipes that use just the 'B' but not the 'H' flag. Either way, the only time you should use the 'H' flag is on recipes that needs to match against both the header and the body. If you want a recipe to match only against the body and you're using 3.22, use the "B ??" modifier on the conditions. See Procmail-L message titled "Cannot get recipies to work properly". So to be most pportable possible, convert all previously used condition lines from:
to use this format:
* B ?? body-check-here
So since we appear to use v3.22 you will want to implement the second method. Searching that resource will give you lots of examples on how to use the "B ??" modifier.
Hope that helps, if you need anything else let us know so we can be of more assistance.