Filter outgoing email

Hello,

Is there any way I can setup a filter that stops any outgoing email on the server from sending if there’s a certain keyword in the subject or body?