This patch adds a test to make sure we handle correctly the case where a hook exits with a permanent failure.
This patch implements a post-DATA hook, which is run after receiving the data but before sending a reply. It can be used to implement content filtering when receiving email, for example for passing the email through an anti-spam or an anti-virus.