-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Ansible playbooks to make for an easy one-button install of mailserver stack on new VPS #65
Comments
@AndrewSav @sknight80 @SaraSmiseth I'm going to create a new repository for the As I wrote on discord, I don't like the name Any ideas for a new name for the repo? |
@ksylvan while I applaud your effort, my opinion that making something as complicated as our setup easy is futile. Do not get me wrong if it works, I'm all for it. I'm very experienced with ansible, and I know it is not nice to work with or troubleshoot and many things can break. With outlook as such I feel I'm not qualified to suggest a better name. Ping me if/when you need testing, I might be able to help with that. |
@AndrewSav I appreciate your point of view. I did it once, about six years ago, and it made deploying 4 domains with similar configurations very easy, so I'll want to do it again with our updated I'll hit you up when I'm ready for testing. |
@ksylvan This is the "script" I have been using to set up the mailserver. I never published it because I feel it is specific to my own use case. Feel free to ignore, but just posting here in case it's useful. This is from a few years back, so some things can be broken now, too. Setting up mailserverDNS recordsMake sure that A records for these applications point to the same IP address of the installation performed:
Create an MX record (prefer. 10) for each domain being set up point it to DockerInstall docker and compose: sudo apt-get install -o Dpkg::Options::="--force-confold" -y apt-transport-https ca-certificates curl git
DOCKER_COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oE "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | sort --version-sort | tail -n 1`
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt-get install jq -y
sudo curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose SwapEnable swap: sudo swapon --show
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo nano /etc/fstab
#/swapfile swap swap defaults 0 0
sudo swapon --show
sudo free -h
sudo reboot MailserverGo to the docker network create http_network
mkdir -p /mnt/docker/acme
touch /mnt/docker/acme/acme.json
chmod 600 /mnt/docker/acme/acme.json
docker-compose up -d Run docker-compose up -d --force-recreate Examine logs Rainloop (admin)
Configure integrations. For google select:
Get Client Id, Client Secret, and API Key from KeePass. PostfixadminFollow Postfixadmin initial configuration. Record setup password, admin email and password in last pass. Create all domains in postfixadmin. Rainloop (user)Go to the DKIMSetup TXT records for DKIM. See this for more details, look at Test
docker-compose.yml:
.env:
file.toml:
traefik.toml:
|
Good stuff, @AndrewSav. Thank you. Did you look at my original scripts in https://github.com/ksylvan/docker-mail-server ? |
@ksylvan well I clicked on the link and saw the repo and the readme, but I did not go over any files as I was not sure at what state of completion they were. |
@AndrewSav Those scripts are complete and I used them to deploy a few domains. I want to recreate that basic idea now using Mailer2 with improvements. |
@ksylvan pretty advanced stuff, selinux, fail2ban, both RedHat and Debian support, looks like you had put in a lot of work back then. |
@AndrewSav Yes, and all of it is working on four existing domains even up to now, and I recently updated all of them to use |
Classification
Reproducibility
Docker information
This is a task to update the https://github.com/ksylvan/docker-mail-server repository, which was based on whatever version of Ansible was running back 6 or 7 years ago and the excellent
hardware/mailserver
stack that is the precursor to the currentmailserver2
repository.Assigning this to myself. 😄
The text was updated successfully, but these errors were encountered: