loomio / loomio-deploy

Install Loomio on your own server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mail-Server Setup / Config-Debug

CodeFreezr opened this issue · comments

Hello dear Loomio-Team,

with your help we have succsessfully installed a loomio server inside our vpc/intranet, and we can start user-registration. Unfortunately the Mailing Service seems to be broken:

root@875675b19c16:/var/log# cat mailin.log
2019-08-12T08:54:46.543Z - info: Webhook url: http://app:3000/email_processor/
2019-08-12T08:54:46.543Z - info: Log file: /var/log/mailin.log
2019-08-12T08:54:46.562Z - info: Mailin Smtp server listening on port 25
2019-08-12T08:54:46.567Z - warn: Webhook http://app:3000/email_processor/ seems invalid or down. You may want to double check the webhook url.

See attached an anonymised env and the used docker-compose.yml
env.txt
docker-compose_yml.txt

Any Ideas?

Hi @CodeFreezr - that error is normal, it's for inbound email rather than outbound.

What problem are you experiencing with your system? Are you finding that outbound email is not working?

I falsely thought that this messages would be an indication why the e-mail outbound is not working. I triple checked our credentials also with other services like our Jenkins, Gerrit etc. So I'm sure the credentials itself are fine. But what would you recommend how to find the mismatch to solve our loomio email outbound issue?

There are a few threads in the installing Loomio group about this.

This one might be helpful:
https://www.loomio.org/d/WaUbwjX8/no-mails

Step-by-Step we come closer to the finish line. Now loomio is able to send Emails with Verification Code. But now we have a merry-go-round. Login-Mask > Welcome Back > "via Email anmelden" > Verfication Code > Login-Mask. I have try to klick the link in the emal. At least I have created an anonymised log excerpt. Do you have a clue?
loomio-login-mail-login-go-round.txt

It is likely that you have misconfigured the hostname.

config/initializers/session_store.rb configures the session cookie that your browser will use to identify itself to Loomio.

So ensure that you're on https and that your CANONICAL_HOST is the hostname you're accessing the system via.

Inside my loomio-app container I found the session_store.rb with this content:

Loomio::Application.config.session_store :cookie_store, key: '_loomio', domain: ENV.fetch('SESSION_DOMAIN', ENV['CANONICAL_HOST']), secure: Rails.env.production?

Where / How can I check the ruby variables to see the resulting value? Sorry, see ruby code the first time.

To use later on our own SSL, we have at first disabled https and letsencrypt stuff for now. For the moment we don't have https.

ENV's come from your env file in the loomio-deploy directory.
I've just pushed a change to master so this looks at ENV['FORCE_SSL'] rather than Rails.env.production? so if you switch from "stable" to "latest" for your docker images, that should fix things for you.

Yes! 1000Thanks: This solved our Probs. Email works, Login works, Admin-Page works. For another Problem I would open another Issue.