Support for rejecting messages

First bash at adding support for rejecting messages.