Described is a system and method for filtering messages received by a message-handling program, that leverage the existing message-handling architecture of computer devices to trigger events and perform other actions instead of (or in addition to) displaying the messages to users. One or more rule clients, e.g., COM objects, register for processing messages. When an appropriate message is received, the message-handling mechanism passes the message to a rule client. Depending on how that rule client responds, the message-handling mechanism determines what to do with the message, e.g., discontinue the message. Messages that are not discontinued are passed to another rule client, if any, or displayed in the user interface, if not. Rule clients may be read only, or may have write access, to modify messages. Messages may be hidden from a user by a rule client, modified before being display to a user, or left intact.