https://www.youtube.com/watch?v=9zP7qooM4pY
https://github.com/lukesmithxyz/emailwiz
Step 0
curl -LO lukesmith.xyz/emailwiz.sh
Step 1
sudo apt install nginx
sudo vim /etc/nginx/sites-available/<your-name>
server {
listen 80 ;
listen [::]:80 ;
root /var/www/<your-root-dir>;
index index.html index.htm index.nginx-debian.html;
server_name mail.unaboomer.com www.mail.unaboomer.com;
location / {
try_files $uri $uri/ =404;
}
}
server {
listen 80 ;
listen [::]:80 ;
root /var/www/htmxinnovations;
index index.html index.htm index.nginx-debian.html;
server_name mail.htmxinnovations.com www.mail.htmxinnovations.com;
location / {
try_files $uri $uri/ =404;
}
}
Step 2
Create link between file and sites-enabled
sudo ln -s /etc/nginx/sites-available/<your-name> /etc/nginx/sites-enabled/
https://community.letsencrypt.org/t/no-valid-ip-addresses-found-for-my-domain/57417/5
Step 3
Reload systemd
systemctl reload nginx
Step 4
Get SSL Cert
sudo apt install certbot letsencrypt python3-certbot-nginx
certbot --nginx
#!/bin/bash
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common wget
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce docker-compose
sudo systemctl status docker
sudo usermod -aG docker ${USER}
su - ${USER}
id -nG
# Add a user to the group if you need it
#sudo usermod -aG docker username
docker
#Notes:
#Start docker-compose as sudo
# Pull docker image from repo
docker pull tvial/docker-mailserver:latest
# docker-mailserver scripts
curl -o setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh
chmod a+x ./setup.sh
curl -o docker-compose.yml https://raw.githubusercontent.com/tomav/docker-mailserver/master/docker-compose.yml.dist
curl -o .env https://raw.githubusercontent.com/tomav/docker-mailserver/master/.env.dist
curl -o env-mailserver https://raw.githubusercontent.com/tomav/docker-mailserver/master/env-mailserver.dist
https://mailinabox.email/guide.html
Ubuntu 18
From Linode https://www.linode.com/docs/email/how-to-create-an-email-server-with-mail-in-a-box/
sudo apt-get update && sudo apt-get upgrade
curl -s https://mailinabox.email/setup.sh | sudo bash
# YOU SHOULD SEE THIS
#Your Mail-in-a-Box is running.
#Please log in to the control panel for further instructions at:
#https://203.0.113.1/admin
#You will be alerted that the website has an invalid certificate. Check that
#the certificate fingerprint matches:
#D7:E7:DC:E1:6F:9E:2A:96:E4:6E:FA:15:FC:AB:97:66:6F:EF:AF:E4:41:3E:14:D6:6B:61:A2:99:BE:38:F1:30