Loomio

Trouble with emails, errors with [websocket ]and /cable

FDS
Fabio dos Santos Public Seen by 60

Hello everyone!

Loomio would be the perfect solution to our non-profits vote that will happen in the coming months.

My setup is a Linode Server ("nanode"). I have root access, IP Address, DNS is registered and a SMTP server configured on another machine that I know it runs.

I have been able to follow all the steps in Loomio-Deploy, with Docker, which no apparent problem. Loomio runs. Letsecrypt issues the SSL Certificate. I noticed that there are WEBSOCKET errors on the logs, and that the email fails to be sent.

I can load the Loomio's website on my host. But I cannot make the first account, as the email with the confirmatio number is never sent.

I'm assuming both issues are related. I am assuming it is an error with the websocket, and consequently the email is not sent out.

Below are the logs. I have tried some of the solutions posted on this forum, but could not solve the problem on my own.

I wonder if there is something in my setup which I am overlooking, or if it is some configuration that I did not complete. (In fact, I have not been able to find where the configurations are stored on the loomio-deploy directory!)

Help would be much appreciated, as Loomio would definitely solve many of or problems! I feel like there is a small tweak and it would work!

The website is running at loomio.associacaomusicalsuzuki.com.br.

Here is a PasteBin with the Logs: https://pastebin.pl/view/7bcfdc0f

FDS

Fabio dos Santos Mon 20 Apr 2020

Oops. Forgot to include the ENV file:

Here it is: https://pastebin.pl/view/8180aad9

RG

Rob Guthrie Wed 22 Apr 2020

Hi @Fabio dos Santos, have you tried using something like Swaks to confirm your SMTP settings? That can offer insight into the correct ENV config.

I'll have a think about how we can make this easier, it's nothing we at Loomio have written, I'm not sure why it seems so many people have trouble configuring Loomio/Rails to send mail.

FDS

Fabio dos Santos Wed 22 Apr 2020

Hi .

Thanks you so much for your response!I have been looking into this.

It seems like a conection error, and someone pointed how they needed to configure the Proxy correctly. So yesterday night, I looked into the jwilder/nginx page on Docker Hub. This particular bit of info from https://hub.docker.com/r/jwilder/nginx-proxy/ called my attention:

+++++++++++++++++++++++

Internet vs. Local Network Access

If you allow traffic from the public internet to access your nginx-proxy container, you may want to restrict some containers to the internal network only, so they cannot be accessed from the public internet. On containers that should be restricted to the internal network, you should set the environment variable NETWORK_ACCESS=internal. By default, the internal network is defined as 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. To change the list of networks considered internal, mount a file on the nginx-proxy at /etc/nginx/network_internal.conf with these contents, edited to suit your needs:

# These networks are considered "internal"
allow 127.0.0.0/8;
allow 10.0.0.0/8;
allow 192.168.0.0/16;
allow 172.16.0.0/12;

# Traffic from all other networks will be rejected
deny all;

When internal-only access is enabled, external clients with be denied with an HTTP 403 Forbidden

+++++++++++++++++++

My email server is not a container or even within the local network. I will try this as soon as I can. But maybe this is the answer: the "external" are not being accessed. That would explain the errors with the email setup.

I'm kind of new to this docker things. I think is amazing. I'm assuming that I need to create /etc/nginx/network_internal.conf with the appropriate IP numbers. If not, please let me know!

I can't tell you how grateful I am, for the software, and for the response. Thank you!

FDS

Fabio dos Santos Wed 22 Apr 2020

I created the file mentioned above, but no change.

Another thing that caught my eye was the SSL Backends config in NGINX. It could well be that it is trying to access website with HTTP, and the server does not authenticate because it should only contact through HTTPS, or port 443. I have just tried to add this to the env to see if it works.

VIRTUAL_PROTO=https
VIRTUAL_PORT=443

FDS

Fabio dos Santos Wed 22 Apr 2020

OK! Some adicional information (I've tried some things.)

Cable/Websocket errors:
Persist when I add the email server's IP address to etc/nginx/network_internal.conf

Cable/ Websocket cease:
When I add the SSL Config to the ENV. HOWEVER, then I have authentication problem to load the website.

Here is the error:

'loomio-nginx   | nginx.1    | 2020/04/22 13:34:04 [error] 85#85: *1 SSLdohandshake() failed (SSL: error:1408F10B:SSL routines:ssl3getrecord:wrong version number) while SSL handshaking to upstream, client: 177.194.12.130, server: loomio.associacaomusicalsuzuki.com.br, request: "GET / HTTP/2.0", upstream: "https://172.17.0.5:3000/", host: "loomio.associacaomusicalsuzuki.com.br"

In both cases, I still get this warning about loomio-mailin: Not sure if this is relevant.

loomio-mailin  | warn: Webhook http://app:3000/email_processor/ seems invalid or down. You may want to double check the webhook url.

There seems to be some conection with nginx-proxy, and its connections to the internet, and the containers, and it is does not seem to be a problem specific to the code-base, but rather in configs.

Thanks!

RG

Rob Guthrie Wed 22 Apr 2020

Are you trying to solve SMTP or Cable issues?

I think you should ignore the cable issues and focus on SMTP, the cable stuff is something that should just work given the config I've provided, and if not, I'll look into it. It works fine for the Loomio installs I support, but I'll review it.

SMTP is critical though, and I think you should confirm your SMTP config with swaks, then report back if loomio works or does not work with that config.

FDS

Fabio dos Santos Thu 23 Apr 2020

Good morning!

Sorry. I was not aware that they were different issues!

I got the email server to work with Swaks. I have received the email.

./swaks --REPLACEDTHEEMAIL@gmail.com --from "no-reply@associacaomusicalsuzuki.com.br" --auth LOGIN --auth-user "no-reply@associacaomusicalsuzuki.com.br"  --auth-password "RANDOMPASSWORD" --server mail.associacaomusicalsuzuki.com.br -tls

And the output:

=== Trying mail.associacaomusicalsuzuki.com.br:465...
=== Connected to mail.associacaomusicalsuzuki.com.br.
=== TLS started with cipher TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
=== TLS no local certificate set
=== TLS peer DN="/C=BR/postalCode=88036-001/ST=Santa Catarina/L=Florianopolis/street=Rua Lauro Linhares, 589/O=Endurance Group Brasil Hospedagem de Sites LTDA/OU=PremiumSSL Wildcard/CN=*.hostgator.com.br"
<~  220-br150.hostgator.com.br ESMTP Exim 4.92 #2 Thu, 23 Apr 2020 10:35:00 -0300 
<~  220-We do not authorize the use of this system to transport unsolicited, 
<~  220 and/or bulk e-mail.
 ~> EHLO caliope.local
<~  250-br150.hostgator.com.br Hello caliope.local [177.194.12.130]
<~  250-SIZE 52428800
<~  250-8BITMIME
<~  250-PIPELINING
<~  250-AUTH PLAIN LOGIN
<~  250 HELP
 ~> AUTH LOGIN
<~  334 VXNlcm5hbWU6
 ~> bm8tcmVwbHlAYXNzb2NpYWNhb211c2ljYWxzdXp1a2kuY29tLmJy
<~  334 UGFzc3dvcmQ6
 ~> TDZnejhaRmZKNFh2RmJjdUY=
<~  235 Authentication succeeded
 ~> MAIL FROM:<no-reply@associacaomusicalsuzuki.com.br>
<~  250 OK
 ~> RCPT TO:<REPLACEDTHEEMAIL@gmail.com>
<~  250 Accepted
 ~> DATA
<~  354 Enter message, ending with "." on a line by itself
 ~> Date: Thu, 23 Apr 2020 10:34:59 -0300
 ~> To: REPLACEDTHEEMAIL@gmail.com
 ~> From: no-reply@associacaomusicalsuzuki.com.br
 ~> Subject: test Thu, 23 Apr 2020 10:34:59 -0300
 ~> Message-Id: <20200423103459.097160@caliope.local>
 ~> X-Mailer: swaks v20190914.0 jetmore.org/john/code/swaks/
 ~> 
 ~> This is a test mailing
 ~> 
 ~> 
 ~> .
<~  250 OK id=1jRc0L-0036He-E7
 ~> QUIT
<~  221 br150.hostgator.com.br closing connection
=== Connection closed with remote host.
FDS

Fabio dos Santos Thu 23 Apr 2020

Will try to set this up on Loomio now.

FDS

Fabio dos Santos Thu 23 Apr 2020

Tried to following configuration, but still get a "fail" message for the email.
Here is what is in my env

# smtp settings
SUPPORT_EMAIL=email-switched@gmail.com
SMTP_AUTH=login
SMTP_DOMAIN=associacaomusicalsuzuki.com.br
SMTP_SERVER=mail.associacaomusicalsuzuki.com.br
SMTP_PORT=465
SMTP_USERNAME=no-reply@associacaomusicalsuzuki.com.br
SMTP_PASSWORD=RANDOMPASSWORD
SMTP_USE_SSL=1
REPLY_HOSTNAME=associacaomusicalsuzuki.com.br
# helper bot is the account which welcomes people to their groups.
HELPERBOTEMAIL=no-reply@associacaomusicalsuzuki.com.br
RAILS_ENV=production

I changed SMTP_AUTH to login.

I feel like that only information that is actually missing (when in compared to SWAKS) is TLS, which I don't know how to add to the env.

FDS

Fabio dos Santos Thu 23 Apr 2020

Here is the error log:

loomio-worker  | Sent mail to email-switched@gmail.com (30011.6ms)
loomio-worker  | 2020-04-23T17:12:51.324Z pid=7 tid=gt6r05v7n class=Sidekiq::Extensions::DelayedMailer jid=68a10f59676f12141d512979 elapsed=30.099 INFO: fail
loomio-worker  | 2020-04-23T17:12:51.326Z pid=7 tid=gt6r05v7n WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"loginemails","backtrace":true,"class":"Sidekiq::Extensions::DelayedMailer","args":["---\n- !ruby/class 'UserMailer'\n- :login\n- - 1\n  - 18\n"],"jid":"68a10f59676f12141d512979","createdat":1587661688.261439,"enqueuedat":1587661941.223482,"errormessage":"execution expired","errorclass":"Net::OpenTimeout","failedat":1587661731.842505,"retrycount":2,"errorbacktrace":"eJzNWNtymzAQ/ZU0L2lnamTAYDu/0umoAjZYNUhUEnbSr6+QcAI0tsEonb7Z\nupyzl6Pdtb/do1oKVPCUFKigCRJ18oICL/aWiIFCslSVJ5LHKNw+Unb3gzKq\nKCnob3i4/zrxLq+ATb+l0gpLnu5BTbi7sncTfXJ/pz9lHEtFxBUIRUvgtWoQ\n/GVo2e3SFOqNuTiOsXfTtzffu5bULCsA5VBKVBJaLAJv7fkGrfna4By52KMM\nCnoA8YJLUDueyVdwf7l9A8fNKpYgJeXDjDhgWtoA2AOfJuKX2iqSQ4MU+NH2\nFMsT3Qy0eDnQhIW8gEhSpQPUAIFYRF7ghQbZLmO7jhIiDX50Bt+cu0JyAFlX\nFRdqwHIA3G4gxhV9oilpqKWJc7zp81EmlahLYJfEcwsbekMGYUIZtrXggwi7\n7o0mGZ+oaNMV6LX8jJSVIzW1yK96N6HwV+8ri/HjXD4BMq1JUhhf/LXh2ZEG\nBMNzCpXJx8c4FfaycNkXSTPY018LXTO92DC0KwieFTBpZNoj7ei0AvHERXkT\nfCV4qq3nBs/fxgYQniGtFeCfPHEAGnez+zm4K+AAhfzSJLo9eBNJSTN96kgE\noHRHKDNc4V8148D3w1bexWdwFDpDKRZVqUm2miaMbY71FjZ7SOeWqU6VMK/4\nZEjDG4Z9Ws1y6cnNIE05U4IXWgB4sGXsWMddReBWMUeqdviVVAmSfnxIAtva\nrkRiYnpXy4npldo08bIQ5ABMFzk/1DOJGVGaBW2+gly0TaBj+/9h+kT8U8+6\nGXbwageSnvNU+8hh3K0HcbceZFRWRKW7m1h0tdLiVKfy6xsWA+DC6KhrdOTM\naKGLuZkHVtNKyMixw1ZyUwMEqSrbNja2DTYr8xl0OeAks8DrgQ9uGP6xD8EY\n4DEJDeZVkYH+/K7+Vs7012MJovXpR5Ry8dKD3ksPnb70guc5tLFxGeggOjut\nuKtOazum5AVPnFSnYDhAz7G0E1nbs5rxwUGe2iGpElDp1uXC63bCdqZ/Pw5a\nEx31ujbP7RrmzIHb7e9GUV/6Z+M8lq6khfHV6vzYRC7j+SysofwkeQKsdgJI\n9nD//Q8p1swh\n","retriedat":1587661849.721321},"jobstr":"{\"retry\":true,\"queue\":\"loginemails\",\"backtrace\":true,\"class\":\"Sidekiq::Extensions::DelayedMailer\",\"args\":[\"---\\n- !ruby/class 'UserMailer'\\n- :login\\n- - 1\\n  - 18\\n\"],\"jid\":\"68a10f59676f12141d512979\",\"createdat\":1587661688.261439,\"enqueuedat\":1587661941.223482,\"errormessage\":\"execution expired\",\"errorclass\":\"Net::OpenTimeout\",\"failedat\":1587661731.842505,\"retrycount\":2,\"errorbacktrace\":\"eJzNWNtymzAQ/ZU0L2lnamTAYDu/0umoAjZYNUhUEnbSr6+QcAI0tsEonb7Z\\nupyzl6Pdtb/do1oKVPCUFKigCRJ18oICL/aWiIFCslSVJ5LHKNw+Unb3gzKq\\nKCnob3i4/zrxLq+ATb+l0gpLnu5BTbi7sncTfXJ/pz9lHEtFxBUIRUvgtWoQ\\n/GVo2e3SFOqNuTiOsXfTtzffu5bULCsA5VBKVBJaLAJv7fkGrfna4By52KMM\\nCnoA8YJLUDueyVdwf7l9A8fNKpYgJeXDjDhgWtoA2AOfJuKX2iqSQ4MU+NH2\\nFMsT3Qy0eDnQhIW8gEhSpQPUAIFYRF7ghQbZLmO7jhIiDX50Bt+cu0JyAFlX\\nFRdqwHIA3G4gxhV9oilpqKWJc7zp81EmlahLYJfEcwsbekMGYUIZtrXggwi7\\n7o0mGZ+oaNMV6LX8jJSVIzW1yK96N6HwV+8ri/HjXD4BMq1JUhhf/LXh2ZEG\\nBMNzCpXJx8c4FfaycNkXSTPY018LXTO92DC0KwieFTBpZNoj7ei0AvHERXkT\\nfCV4qq3nBs/fxgYQniGtFeCfPHEAGnez+zm4K+AAhfzSJLo9eBNJSTN96kgE\\noHRHKDNc4V8148D3w1bexWdwFDpDKRZVqUm2miaMbY71FjZ7SOeWqU6VMK/4\\nZEjDG4Z9Ws1y6cnNIE05U4IXWgB4sGXsWMddReBWMUeqdviVVAmSfnxIAtva\\nrkRiYnpXy4npldo08bIQ5ABMFzk/1DOJGVGaBW2+gly0TaBj+/9h+kT8U8+6\\nGXbwageSnvNU+8hh3K0HcbceZFRWRKW7m1h0tdLiVKfy6xsWA+DC6KhrdOTM\\naKGLuZkHVtNKyMixw1ZyUwMEqSrbNja2DTYr8xl0OeAks8DrgQ9uGP6xD8EY\\n4DEJDeZVkYH+/K7+Vs7012MJovXpR5Ry8dKD3ksPnb70guc5tLFxGeggOjut\\nuKtOazum5AVPnFSnYDhAz7G0E1nbs5rxwUGe2iGpElDp1uXC63bCdqZ/Pw5a\\nEx31ujbP7RrmzIHb7e9GUV/6Z+M8lq6khfHV6vzYRC7j+SysofwkeQKsdgJI\\n9nD//Q8p1swh\\n\",\"retriedat\":1587661849.721321}"}
loomio-worker  | 2020-04-23T17:12:51.326Z pid=7 tid=gt6r05v7n WARN: Net::OpenTimeout: execution expired
loomio-worker  | 2020-04-23T17:12:51.327Z pid=7 tid=gt6r05v7n WARN: /usr/local/lib/ruby/2.6.0/net/smtp.rb:539:in `initialize'

(the email has been switched)

FDS

Fabio dos Santos Thu 23 Apr 2020

INTERESTING:

I first ran SWAKS from my personal computer, and that ran fine.

It ocurred to me to try the same command on the server where Loomio is installed. The same command failed. Still investigating.

FDS

Fabio dos Santos Fri 24 Apr 2020

Ok. Advancing slowly, but surely.

I checked with Linode, and here is what I found:

Linode blocks outbound mail for accounts after 2019Nov5 until you do a few things and put in a ticket.

I have the procedure. I will do that tomorrow.

FDS

Fabio dos Santos Fri 24 Apr 2020

Ok! I have contacted Linode. I the SWAKS now works on the Linode.

Still no success the Loomio config.

Here is what I am running on SWAKS, followed by the tet in the ENV:

SWAKS:

./swaks --to someemailsomewhere@gmail.com --from "no-reply@associacaomusicalsuzuki.com.br" --auth LOGIN --auth-user "no-reply@associacaomusicalsuzuki.com.br"  --auth-password "WOULDNOTTELLYOUWHICH" --server mail.associacaomusicalsuzuki.com.br -tlsc

ENV:

# smtp settings
SUPPORT_EMAIL=mypersonalemailgoeshere@gmail.com
SMTP_AUTH=login
SMTP_DOMAIN=associacaomusicalsuzuki.com.br
SMTP_SERVER=mail.associacaomusicalsuzuki.com.br
SMTP_PORT=465
SMTP_USERNAME=no-reply@associacaomusicalsuzuki.com.br
SMTP_PASSWORD=SOMEPASSWORDHERE
SMTP_USE_SSL=1
REPLY_HOSTNAME=associacaomusicalsuzuki.com.br
# helper bot is the account which welcomes people to their groups.
HELPER_BOT_EMAIL=no-reply@associacaomusicalsuzuki.com.br
RAILS_ENV=production

ERROR:

loomio-worker  | Sent mail to mypersonalemail@gmail.com (120.5ms)
loomio-worker  | 2020-04-24T02:06:17.978Z pid=7 tid=ow347wr7n class=Sidekiq::Extensions::DelayedMailer jid=9123c511910aa9399f93804e elapsed=0.181 INFO: fail
loomio-worker  | 2020-04-24T02:06:17.979Z pid=7 tid=ow347wr7n WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"loginemails","backtrace":true,"class":"Sidekiq::Extensions::DelayedMailer","args":["---\n- !ruby/class 'UserMailer'\n- :login\n- - 1\n  - 20\n"],"jid":"9123c511910aa9399f93804e","createdat":1587693902.989345,"enqueuedat":1587693977.796429,"errormessage":"550-Verification failed for <notifications@associacaomusicalsuzuki.com.br>\n","errorclass":"Net::SMTPFatalError","failedat":1587693928.837886,"retrycount":1,"errorbacktrace":"eJzNWNtymzAQ/ZU0L0lnamTAYDu/0umoAjaYGiQqCTv5+wpJToHEBBu507dE\nl3P2crS7+Ps9agRHJUtJicoiQbxJXlHgxd4SUZBIVLL2ePK0jbdPBb37me4g\n3WMOomZUwMP9t6n3w7W+n4Nk++nXNnGkr/G0lpJdcG8V63uJOrm/U38ZAFwW\nQl6CstIoQNLd5beuoowjE2cBNMMVCEHyYZSThmYloBwqgSpSlIvAW3u+Bm3/\nbeGOjO9RBmVxAP6qYOSOZUJz4JRRCqksGG3pImOqPfrFJVML7y/9fhrOEI0E\nJPJtQCThwzg6sK8DjnV8hIq5Co57puWcSFsltEiBbyWSMXyim4EWLz/M0Agi\n0eppgYAvIi/wQo1slrFZRwkRGj86g6/PfUJyANHUNeNywHIAbDcQZbJ4LlLS\nUgsd53jT5yuokLypgI6J5xo29BcZuA5lqJlvRth1bzLJ9ERFm65AP8vPRFk5\nUpNFftO7DoW/+lhZlB3n8qn+ljYkKbUvvulcO9KCYHhJodb5uI1TYS8L476I\nIoN98XuhaqYXawa7guBFAhVapj3Sjk5r4M+MV1fB15ylynqm8fyt6bXwAmkj\nAf9iiQPQuJvdx+CuhAOU4mubaHvwKpKqyNSpI+GA0h0pdBP0w3c148D2Y22X\nwpGrDKWY15Ui2SqaMDY5VltY7yGVWyo7VUK/4pMhLW8Y9mkVy9iTm0Gqmr7k\nrFQCwIMtbcc67ioCW8UcC7nDb6SSk/T2IQnslDkeiQvTu1pemF41fEn+uuDk\nAFQVOT9UM4keUdoFZb6EnNsm0LH9/zD9QvxTz7oadvBqB5Ke81T7yGF3oH+M\nu/UgK0RN5LsRfRqLqlZKnPJUfs28qgFcGB11jY6cGc1VMdfzwOqyEjJx7DCV\nXNcATuratI2NaYPtynwGVQ4YyQzweuCDG4Z/7EMwBXhKQoN5VWSgv+7n1+PK\nmf56LEG0Pn1ESRcvPei99NDpSy9ZnoONjctAB9HZacVddVqbMSUvWeKkOgXD\nAXqOpZ3Imp7Vjg8O8mSHpJpDrVqXC6/thO1M/34cWBMd9TqbZ7uGGXXgtv1u\n5M3YLxvnsVQlLbWvRufHNnIZy2dhDeUnyDNgueNAsof7H38APhotVQ==\n","retriedat":1587693954.468353},"jobstr":"{\"retry\":true,\"queue\":\"loginemails\",\"backtrace\":true,\"class\":\"Sidekiq::Extensions::DelayedMailer\",\"args\":[\"---\\n- !ruby/class 'UserMailer'\\n- :login\\n- - 1\\n  - 20\\n\"],\"jid\":\"9123c511910aa9399f93804e\",\"createdat\":1587693902.989345,\"enqueuedat\":1587693977.796429,\"errormessage\":\"550-Verification failed for <notifications@associacaomusicalsuzuki.com.br>\\n\",\"errorclass\":\"Net::SMTPFatalError\",\"failedat\":1587693928.837886,\"retrycount\":1,\"errorbacktrace\":\"eJzNWNtymzAQ/ZU0L0lnamTAYDu/0umoAjaYGiQqCTv5+wpJToHEBBu507dE\\nl3P2crS7+Ps9agRHJUtJicoiQbxJXlHgxd4SUZBIVLL2ePK0jbdPBb37me4g\\n3WMOomZUwMP9t6n3w7W+n4Nk++nXNnGkr/G0lpJdcG8V63uJOrm/U38ZAFwW\\nQl6CstIoQNLd5beuoowjE2cBNMMVCEHyYZSThmYloBwqgSpSlIvAW3u+Bm3/\\nbeGOjO9RBmVxAP6qYOSOZUJz4JRRCqksGG3pImOqPfrFJVML7y/9fhrOEI0E\\nJPJtQCThwzg6sK8DjnV8hIq5Co57puWcSFsltEiBbyWSMXyim4EWLz/M0Agi\\n0eppgYAvIi/wQo1slrFZRwkRGj86g6/PfUJyANHUNeNywHIAbDcQZbJ4LlLS\\nUgsd53jT5yuokLypgI6J5xo29BcZuA5lqJlvRth1bzLJ9ERFm65AP8vPRFk5\\nUpNFftO7DoW/+lhZlB3n8qn+ljYkKbUvvulcO9KCYHhJodb5uI1TYS8L476I\\nIoN98XuhaqYXawa7guBFAhVapj3Sjk5r4M+MV1fB15ylynqm8fyt6bXwAmkj\\nAf9iiQPQuJvdx+CuhAOU4mubaHvwKpKqyNSpI+GA0h0pdBP0w3c148D2Y22X\\nwpGrDKWY15Ui2SqaMDY5VltY7yGVWyo7VUK/4pMhLW8Y9mkVy9iTm0Gqmr7k\\nrFQCwIMtbcc67ioCW8UcC7nDb6SSk/T2IQnslDkeiQvTu1pemF41fEn+uuDk\\nAFQVOT9UM4keUdoFZb6EnNsm0LH9/zD9QvxTz7oadvBqB5Ke81T7yGF3oH+M\\nu/UgK0RN5LsRfRqLqlZKnPJUfs28qgFcGB11jY6cGc1VMdfzwOqyEjJx7DCV\\nXNcATuratI2NaYPtynwGVQ4YyQzweuCDG4Z/7EMwBXhKQoN5VWSgv+7n1+PK\\nmf56LEG0Pn1ESRcvPei99NDpSy9ZnoONjctAB9HZacVddVqbMSUvWeKkOgXD\\nAXqOpZ3Imp7Vjg8O8mSHpJpDrVqXC6/thO1M/34cWBMd9TqbZ7uGGXXgtv1u\\n5M3YLxvnsVQlLbWvRufHNnIZy2dhDeUnyDNgueNAsof7H38APhotVQ==\\n\",\"retriedat\":1587693954.468353}"}
loomio-worker  | 2020-04-24T02:06:17.979Z pid=7 tid=ow347wr7n WARN: Net::SMTPFatalError: 550-Verification failed for <notifications@associacaomusicalsuzuki.com.br>

OBS:

Looking this error log, now, I see an email I did not know I needed to create. notifications@associacaomusicalsuzuki.com.br. I'll go ahead and create that.

I also created a "no-reply@associacaomusicalsuzuki.com.br", which seemed logical, since it is the ENV. But that does not seem to be the cause of the error.


Advancing slowly. Please let me know your thoughts. Now I am sure SMTP Works on my server. It is definately something in Loomio!

FDS

Fabio dos Santos Fri 24 Apr 2020

I GOT IT TO WORK! Thanks for being pacient!

Lessons learned:

1) Make sure your server you can connect to your email server.
2) Create the necessary emails on your email server. Mainly "no-reply", and "notifications".

Things that could improve the experience of installing Loomio: 1) add a check to make sure that email server can be reached in install procedure. 2) add a check that all necessary emails have been created.

Still don't understand what the websocket or the /cable error is about. Should I be worried or add any specific change related to this?

RG

Rob Guthrie Sat 25 Apr 2020

It's good to know it wasnt a Loomio issue after all. SMTP is quite troubling some times eh.

The cable errors.. They're not critical, at worst, live update of changes (see someone else's comment appear without reload) won't work. I'll fix it in the repo if I do find the problem there.

FDS

Fabio dos Santos Tue 28 Apr 2020

About the Webcables error, I found this thread on StackOverflow.

https://stackoverflow.com/questions/40748539/what-should-the-actioncable-url-be-set-to-under-docker

The error we are getting seems similar.

R

Rich Sun 10 May 2020

@Rob Guthrie I think you're wrong here, I'm pretty sure this is a Loomio problem as it requires notifications@your.smtp.domain to exist. I've come across this as I'm seeing what sounds like the exact same problems. Unfortunately the 'fix' of adding notifications@my.domain doesn't really work for me as the domain I'm using isn't only used for Loomio.

I've dug around in the code a little and seeing in base_mailer.rb that there seemed to be a way to override this, I set the env var NOTIFICATIONS_EMAIL_ADDRESS=no-reploy@my.domainin the worker container. Loomio then thought it was successfully sending emails but actually our mail server was giving an error as it was trying to send from the address my.smtp.username@my.smtp.server.domain.

Sorry if hijacking this thread isn't the right thing to do, I can start a new one if preferred.

RG

Rob Guthrie Sun 10 May 2020

Happy to be wrong and consider alternatives. I'm not sure what the problem is exactly, though.

Loomio must send notifications from some address. Some mail servers require that sending addresses are setup as receiving addresses, or are registered to be able to send email, but that's a per mail server thing.

It's not a hard/formal SMTP requirement that you send mail from addresses that "exist", and it's not Loomio that's requiring it.

However I'm not sure that this is the root of the problem. Are you saying you would like to configure the from address for notifications? How would you solve the problem?

R

Rich Wed 13 May 2020

It seems there are 2 problems. The first is the one is that there's not enough documentation around hosting your own Loomio instance so the existence of the NOTIFICATIONS_EMAIL_ADDRESS env var isn't easy to find. The only reference to it loomio that Google can find is from your response to a Github issue. I'd love to see this fixed by having proper documentation so you can see what's required of your mail server and how to work around an constraints, just like this.

The second issue is something I'm not sure about where to go with as it seems that somewhere between the ActionMailer config in Loomio and it actually trying to send it's messing up the SMTP username. My suspicion is that ActionMailer is assuming that the username is the first half of an email address. This is often the case but in my case the mail server we're using runs mails for multiple domains, so the username is of the form name@domain1.org or name@domain2.org, etc. so the error I'm seeing is that the address name@domain1.org@mailserver.domain doesn't meet the specs for an email address.