Hey guys,
after reading through the setup docs, the gitlab issues and this thread, along a bunch of other guides and documents, I’ve managed to set up the entire baserow stack based on the no-caddy compose files. Everything apart from the emails works perfectly. The debug and test instructions outlined here don’t seem to apply to me, as I will describe in a second.
The error I get
[2023-03-24 13:19:06,569: WARNING/ForkPoolWorker-2] djcelery_email_send_multiple[1f09f2f6-c9f0-4e63-9f01-ddcd86e1526a]: Failed to send email message to ['inbox@mail.com'], retrying. (SMTPServerDisconnected('Connection unexpectedly closed'))
[2023-03-24 13:19:06,572: INFO/ForkPoolWorker-2] Task djcelery_email_send_multiple[1f09f2f6-c9f0-4e63-9f01-ddcd86e1526a] succeeded in 240.145206590998s: 0
[2023-03-24 13:19:06,573: INFO/MainProcess] Task djcelery_email_send_multiple[1f09f2f6-c9f0-4e63-9f01-ddcd86e1526a] received
[2023-03-24 13:24:07,104: ERROR/ForkPoolWorker-2] djcelery_email_send_multiple[1f09f2f6-c9f0-4e63-9f01-ddcd86e1526a]: Cannot reach CELERY_EMAIL_BACKEND django.core.mail.backends.smtp.EmailBackend
Traceback (most recent call last):
File "/baserow/venv/lib/python3.9/site-packages/djcelery_email/tasks.py", line 40, in send_emails
conn.open()
File "/baserow/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 62, in open
self.connection = self.connection_class(self.host, self.port, **connection_params)
File "/usr/lib/python3.9/smtplib.py", line 253, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python3.9/smtplib.py", line 341, in connect
(code, msg) = self.getreply()
File "/usr/lib/python3.9/smtplib.py", line 398, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed
environment variables from compose.yml
# Set these to enable Baserow to send emails.
EMAIL_SMTP: "true" #putting true without quotes makes no difference
EMAIL_SMTP_HOST: "server.mail.com"
EMAIL_SMTP_PORT: 465
EMAIL_SMTP_USE_TLS: #setting or not setting this makes no difference
EMAIL_SMTP_USER: "vps"
EMAIL_SMTP_PASSWORD: "password"
FROM_EMAIL: "baserow@mail.com"
I’m running a bunch of other services from this server, which all use the same mailserver, credentials and port. Therefore im certain that these are correct.
Since I’m using the no-caddy compose file (/baserow/-/blob/develop/docker-compose.no-caddy.yml), it is too long to post here. I will supply needed sections from it when asked for.
Regarding the debug steps described in this post
- The instructions from post #9 don’t seem to be applicable in my case. The
baserow.sh
file exists nowhere in thebaserow-backend
container. Running./baserow shell
from the backend directory, as instructed, returns/usr/bin/env: 'python': No such file or directory
. - The instructions from post #4 also don’t seem to apply, because the error already states that the
django.core.mail
yada yada backend is being used. I did not try to change the backend to the CeleryMailBackend, mainly because I am not too sure how to in my case.
An issue on gitlab talking about SSL ports (/baserow/-/issues/1646) also has caught my attention. Since I’m forced to use port 465, I really hope there is no arbitrary limit which mail ports are usable.
I’d love to get some advice what to do here. I’m so close to deploying Baserow and wouldn’t wanna be stopped by emails not working! Thanks in advance.