Forwarding based on keywords in sendmail

I have an application that runs on the server with root privileges and all emails it sends get sent to root (errors, logs, etc), when they should actually go to one of application admins.
I would like to separate these emails from the OS related one sent to root and forward them to that application admins. I was thinking about .forward file in root user home and separation based on keywords picked from the message but I do not know how it can be achieved. Could someone post some examples or links to such examples?
Is there other ways to set up such forwarding?
Best regards
Leonid

assuming procmail is on your system, then you want to use your .procmailrc:

:0HB
* ^From.*somewhere@someserver.com
* .*Application Report
{
       :0 c
       ! destination.address@somewhere.com
}

Look at man procmailex for examples, but this basically says to look for a message from somewhere@someserver.com with the phrase "Application Report" and then it forwards it to destination.address@somewhere.com

Thank you. That will do.