Trim messages received from clients before forwarding.