-
-
Notifications
You must be signed in to change notification settings - Fork 26
ChatMail destroys existing nginx site configurations #562
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
Comments
And even after I restore nginx.conf from the apt package default, nginx is not working anymore. |
Okay, seems like the main left over problem was the that acme redirect service added by chatmail for the web interface. No idea what that is for.
I don't know why but reboot was necessary because I could not start nginx.service since it was "inactive", whatever that means. After that all the nginx hosted sites work normally again. After that it seems chatmail continues to work, apart from the fact that the web page is gone. Only issue I still had here was that I had to remove the CAA DNS record that was recommended during the chatmail installation, because it would not let me generate a new certificate with certbot for that domain. |
Then add this (from chatmail's overwritten nginx.conf) to the site config you individually created under sites-available:
(no idea about the /metrics route, though) And a minimal onboarding page with working account sign-up link could then look like this:
Seems to work fine. No idea what all the other stuff from chatmail's nginx.conf is for. |
Configuration is not really composable like this. If you already have websites on port 443, appending stream server also listening on port 443 will not work. Besides that,
Then in probably should be added to the readme. Generally we expect that chatmail server is installed on a dedicated (virtual) machine. Otherwise it is possible that you already have an SMTP server such as Exim or IMAP server on your machine.
This was indeed likely due to acmetool listening on port 80. acmetool is running in the redirector mode to get TLS certificates from Let's Encrypt. It redirects all HTTP requests from port 80 to port 443 and answers to ACME challenges.
chatmail setup uses acmetool to get TLS certificates. This is documented in the readme. Both acmetool and certbot cannot be used at the same time.
|
Thank you for all the explanations, @link2xt !
So this means everything should work without it, except for people who are in such a network?
As I mentioned, I added a TLS certificate with certbot for the web interface, and everything else seems to be still working. Is the acmetool-managed TLS certificate still required if I don't use the above-mentioned HTTPS multiplexing and simply use certbot for the web interface as I do now? So far it seems to work with acmetool disabled. I just wonder if there will be any issues when the originally issued acmetool-managed certificate expires. And otherwise: How to completely and cleanly uninstall chatmail? It would be nice if there was a script for that. I haven't seen one. |
Exactly :) some networks block SMTP ports for example, we don't let that stop us as long as port 443 works.
As long as you re-enable the certbot renewal cronjob and disable the acmetool one it should be fine.
As the recommended way to install chatmail relays is to use a completely new server, the recommended way is to remove the whole server... but in cases like yours, manually disabling the services and then removing /home/vmail to get rid of the user data should be more or less enough. You might want to keep or remove /var/lib/acme or /etc/dkimkeys, too. I created a PR which ensures that all ports we need are free or occupied by processes we installed ourselves :) |
Instead of overwriting /etc/nginx/nginx.conf, why not add configs in /etc/nginx/sites-available and symlink them as is common?
This is just bad and reckless.
How do I get my old nginx.conf back? There is no backup.
There is not even a warning about it. Not that I have seen.
The text was updated successfully, but these errors were encountered: