Check out https://github.com/sovereign/sovereign/blob/master/README.md
Might have some of what you are looking for already done.
On Dec 10, 2017 2:06 PM, André Rodier <an...@rodier.me> wrote:
I have been using Postfix and Dovecot for my personal emails for years.
After being tired of reinstalling my personal mail server many times, I
am currently writing some Ansible scripts to do it automatically.
I obviously checked the other projects, and did not found anything close
to what I am looking for, so I am implementing it now.
The final goal is to have a box that once online, would setup itself, by
creating the certificates, the DKIM keys and update the appropriate DNS
This is so far what I have achieved:
- Automatic generation of certificates using LetsEncrypt
- Automatic update of the domain entries: imap, smtp, webmail, etc.
- Automatic generation of a DKIM keys
- Automatic update of specific records (MX, SPF, DKIM, etc.)
- LDAP server for user accounts, with or without system login.
- Installation of Postfix, Dovecot and Roundcube
Sending DKIM signed emails is working, and the IMAP server is configured
as well, although basic.
The postfix and dovecot configuration are not yet entirely finished. I
am planing to add an anti spam system, and sieve, amongst other things.
Although in development during my spare time, the system is normally
robust and you should be able to run it multiple times without errors.
If anyone is interested to use it, to have a look, or to take part, it
is here: https://github.com/progmaticltd/homebox