review cleanup

This commit is contained in:
Balakrishnan Balasubramanian 2023-06-28 22:24:48 -04:00
parent 5e5870935c
commit eddf25f1a2

View File

@ -1,28 +1,22 @@
# Deployment command line # Deployment command line example
Example terminal session for deploying. ssh to your VPS and follow along. Minor differences may be required. e.g. if you are already root, skip `sudo`. If curl is missing, use wget. Example terminal session for deploying. ssh to your VPS and follow along. Minor differences may be required. e.g. if you are already root, skip `sudo`. If curl is missing, use wget.
## Check python version ## Check python version
Python version should be a supported (as of now 3.9 and above) Python version should be a supported (as of now 3.9 and above)
```sh ```sh
python3 -V python3 -V
``` ```
## Choose release ## Choose release
```sh ```sh
RELEASE=v1.0-rc5 RELEASE=v1.0
``` ```
## Download App ## Download App
```sh ```sh
curl -OL "https://gitea.balki.me/balki/mail4one/releases/download/$RELEASE/mail4one.pyz" curl -OL "https://gitea.balki.me/balki/mail4one/releases/download/$RELEASE/mail4one.pyz"
rm mail4one.pyz
```
## Set executable permission
```sh
chmod 555 mail4one.pyz chmod 555 mail4one.pyz
``` ```
@ -82,15 +76,16 @@ ls -l /usr/local/bin/mail4one
sudo cp mail4one.service /etc/systemd/system/mail4one.service sudo cp mail4one.service /etc/systemd/system/mail4one.service
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable --now mail4one.service sudo systemctl enable --now mail4one.service
systemctl status mail4one
``` ```
Above command should fail as the tls certificates don't exist yet. Lets fix that next Above command should fail as the TLS certificates don't exist yet.
## Setup tls certificates ## Setup TLS certificates
Install [certbot](https://certbot.eff.org/) and run below command. Follow instructions to create tls certificates. Usually you want certificate for domain name like `mail.example.com` Install [certbot](https://certbot.eff.org/) and run below command. Follow instructions to create TLS certificates. Usually you want certificate for domain name like `mail.example.com`
```sh ```sh
sudo certbot certonly sudo certbot certonly
sudo cp /etc/letsencrypt/live/mail.example.com/{fullchain,privkey}.pem /var/lib/mail4one/certs/ sudo cp /etc/letsencrypt/live/mail.example.com/{fullchain,privkey}.pem /var/lib/mail4one/certs/
sudo chwon mail4one:mail4one /var/lib/mail4one/certs/{fullchain,privkey}.pem sudo chown mail4one:mail4one /var/lib/mail4one/certs/{fullchain,privkey}.pem
# Edit mail4one_cert_copy.sh to update your domain name # Edit mail4one_cert_copy.sh to update your domain name
sudo cp mail4one_cert_copy.sh /etc/letsencrypt/renewal-hooks/deploy/ sudo cp mail4one_cert_copy.sh /etc/letsencrypt/renewal-hooks/deploy/
@ -116,3 +111,4 @@ You should see file listing a, b, c. Repeat for port 465, 995 to make sure firew
```sh ```sh
curl http://mail.example.com:25 curl http://mail.example.com:25
``` ```
If not working, refer to VPS settings and OS firewall settings.