From cbcae31288ff68c036e052fb8d04255a6e276ba5 Mon Sep 17 00:00:00 2001 From: Son Nguyen Kim Date: Thu, 29 Jul 2021 10:43:36 +0200 Subject: [PATCH] add troubleshooting doc --- README.md | 1 + docs/investigation.md | 0 docs/troubleshooting.md | 65 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) delete mode 100644 docs/investigation.md create mode 100644 docs/troubleshooting.md diff --git a/README.md b/README.md index 84b343a0..bf0e5641 100644 --- a/README.md +++ b/README.md @@ -517,6 +517,7 @@ If you like the project, you can make a donation on our Patreon page at https:// The above self-hosting instructions correspond to a freshly Ubuntu server and doesn't cover all possible server configuration. Below are pointers to different topics: +- [Troubleshooting](docs/troubleshooting.md) - [Enable SSL](docs/ssl.md) - [UFW - uncomplicated firewall](docs/ufw.md) - [SES - Amazon Simple Email Service](docs/ses.md) diff --git a/docs/investigation.md b/docs/investigation.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 00000000..d4ec529a --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,65 @@ +# Troubleshooting + +## A. If you can't receive a welcome email when signing up + +This can either mean: + +1) Postfix can't send emails to your mailbox +2) The `sl-app` container can't connect to Postfix (run on the host) + +### A.1 +To test 1), running `swaks --to your-mailbox@mail.com` should send you an email. +Make sure to replace `your-mailbox@mail.com` by your mailbox address. +`swaks` can be installed with `sudo apt install swaks` on Debian-based OS. + +### A.2 +Once 1) works, we can test the 2) by + +a) first connecting to the container by `docker exec -it sl-app bash` +b) then run the following commands + +```bash +apt update +apt install telnet -y +telnet 240.0.0.1 25 +``` + +If the `telnet 240.0.0.1 25` doesn't work, it means Postfix can't be reached from the docker container. +This means an issue with the Docker network. + +You can then try `telnet 172.17.0.1 25` as `172.17.0.1` is *usually* the host IP address. If this works, then you can set +the `POSTFIX_SERVER=172.17.0.1` in your SimpleLogin config file `~/simplelogin.env` and re-run all the containers. + +If not, please run through the self-hosting instructions and make sure no step is missed. + +## B. You send an email to your alias and can't receive the forwarded email on your mailbox + +This can be either due to: + +1) Postfix doesn't recognize the alias domain +2) Postfix can't connect to the `sl-email` container +3) `sl-email` container can't connect to Postfix +4) Postfix can't send emails to + +### B.1 +For 1), this can mean the `/etc/postfix/pgsql-relay-domains.cf` and `/etc/postfix/pgsql-transport-maps.cf` aren't correctly set up. +To test 1), `postmap -q mydomain.com pgsql:/etc/postfix/pgsql-relay-domains.cf` should return `mydomain.com`. + +And `postmap -q not-exist.com pgsql:/etc/postfix/pgsql-relay-domains.cf` should return nothing. + +`postmap -q mydomain.com pgsql:/etc/postfix/pgsql-transport-maps.cf` should return `smtp:127.0.0.1:20381` + +And `postmap -q not-exist.com pgsql:/etc/postfix/pgsql-transport-maps.cf` should return nothing. + +### B.2 +For 2), you can check in the `sl-email` log by running `docker logs sl-email` and if the incoming email doesn't appear there, +then it means Postfix can't connect to the `sl-email` container. Please run through the self-hosting instructions and +make sure no step is missed. + +### B.3 + +For 3), you can check in the `sl-email` log by running `docker logs sl-email` and make sure there's no error there. + +### B.4 +For 4), please refer to the A.1 section to make sure Postfix can send emails to your mailbox. +