IMPORTANT NOTE: This is a work in progress, and not yet finished or functional!
This is an Ansible-Playbook for an adapted version of the mail server setup described in this tutorial: https://thomas-leister.de/mailserver-debian-stretch/ written by Thomas Leister.
This mail server is intended to run on AlmaLinux OS 9 (and equivalents).
- Ansible >= 2.7
- Server with AlmaLinux OS 9 operating system (equivalent OS's might work, but have not been tested)
- SSH key to login to the server
- Public domain resolving to the server
Set the hostname in the inventory file hosts
All variables are stored in the vars file. Set the values according to your server.
Credentials are stored in the vault.yml. The Password is "vault".
Please change the password with ansible-vault rekey group_vars/all/vault.yml
.
- Database user: "vmail", pass: "vmail" (Please change it)
- Mail user: "mail", pass: "mail" (Please change it)
- Rspam admin password: "rspamadmpw"
ansible-playbook -i ./hosts site.yml --ask-vault-pass
The results of the ansible playbook can be tested with Molecule
Build the mail server
ANSIBLE_VAULT_PASSWORD_FILE=<YOUR_VAULT_PASS_FILE_PATH> molecule converge
Verify the installation
ANSIBLE_VAULT_PASSWORD_FILE=<YOUR_VAULT_PASS_FILE_PATH> molecule verify
Build, test and destroy in one command
ANSIBLE_VAULT_PASSWORD_FILE=<YOUR_VAULT_PASS_FILE_PATH> molecule test