I'm looking for a way to intercept emails received via a dovecot server. Our intent is to somehow capture the header and body of the email, store it in the database (as useable data) which we can process at a later stage.
We're attempting to setup a backup mail server so that when our's goes down, it will capture all emails received and via a cronjob resend these emails to the recipient.
Where would I start? We're happy to use Postfix or any other existing platform to achieve something similiar.