How to use hooks
The dovel server sends the mbox email as input the receiving hook. It doesn't run any check or sanitizes it, this up to the hook to decide.
One good starting point is the receive-example.domain hook, that creates html pages for your email.
Hooks can be any executable file that reads from standard input.