ClaperCo / Claper

The ultimate tool to interact with your audience
https://claper.co
GNU Affero General Public License v3.0
470 stars 55 forks source link

SMTP does not work... #112

Open marcogaio opened 1 month ago

marcogaio commented 1 month ago

I'm testing Claper (wondeful!) for a Linux User group here in north east of Italy (Pordenone Linux User Group, PNLug).

I was able to run the docker container, fix some issue putting it behind a nginx reverse proxy (if needed, i can provide feedback on that, because i've not found info on documents) but still Claper does not send email.

Docker VM is part of a little virtualization setup, where there's also an SMTP server/relay that send email for all the services. I've setup .env as:

SMTP_RELAY=10.21.13.180
SMTP_AUTH=never
SMTP_PORT=25
SMTP_TLS=never
SMTP_SSL=false

But email does not get sent; even, i've sniffed on network interfaces, end there's even NO SMTP traffic, so Claper seems never tries to send email...

Network and SMTP server reachability seems fine:

root@vdockerpnlug1:~# docker ps
CONTAINER ID   IMAGE                            COMMAND                  CREATED        STATUS                  PORTS                                       NAMES
ff6a3668b491   ghcr.io/claperco/claper:latest   "sh -c '/app/bin/cla…"   20 hours ago   Up 20 hours (healthy)   0.0.0.0:4000->4000/tcp, :::4000->4000/tcp   claper-app-1
dddc4a72e4f4   postgres:15                      "docker-entrypoint.s…"   20 hours ago   Up 20 hours (healthy)   0.0.0.0:5432->5432/tcp, :::5432->5432/tcp   claper-db-1
root@vdockerpnlug1:~# docker exec -it  ff6a3668b491 bash
ff6a3668b491:/app# nc 10.21.13.180 25
220 mail.artemis.pnlug.it ESMTP Exim 4.94.2 Mon, 14 Oct 2024 14:17:05 +0200
help
214-Commands supported:
214 AUTH STARTTLS HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP
quit
221 mail.artemis.pnlug.it closing connection

What i'm doing wrong?! Thanks.

alxlion commented 1 month ago

Ciao Marco!

Claper doesn't send a lot of emails, it only sends an email when

Have you tried this to test your smtp configuration?

marcogaio commented 1 month ago

Sorry, forgot a piece; my complete email configuration in `.env ' is:

MAIL_TRANSPORT=smtp
MAIL_FROM=tech@pnlug.it
MAIL_FROM_NAME=Claper

SMTP_RELAY=10.21.13.180
SMTP_AUTH=never
SMTP_PORT=25
SMTP_TLS=never
SMTP_SSL=false

I've tried to:

  1. change my password
  2. change my email
  3. reset my password

no email get sent...

marcogaio commented 1 month ago

Claper doesn't send a lot of emails, it only sends an email when

Sorry, forgot to say.

So there's no confirmation mechanism for user creation? This cannot lead to user creation bombing attacks?

alxlion commented 1 month ago

Email is always a pain to manage, so we try to avoid it at all costs. We use anti-bot and anti-spam on the frontend of our instance to avoid any bombing.

Regarding your issue, are you sure that the container has access to 10.21.13.180?

marcogaio commented 1 month ago

Email is always a pain to manage, so we try to avoid it at all costs. We use anti-bot and anti-spam on the frontend of our instance to avoid any bombing.

Ok... have some example configuration/hint/... to share? Thanks.

Regarding your issue, are you sure that the container has access to 10.21.13.180?

Sure! As you can see in my first post, i spawned a shell into the claper container and accessed the mail server.

alxlion commented 1 month ago

We just added EMAIL_CONFIRMATION to enable email confirmation at registration if you need so (https://docs.claper.co/self-hosting/configuration.html#email-confirmation) (available on the dev version).

Do you have any app logs in Claper to share?

marcogaio commented 1 month ago

We just added EMAIL_CONFIRMATION to enable email confirmation at registration if you need so (https://docs.claper.co/self-hosting/configuration.html#email-confirmation) (available on the dev version).

I've stopped, updated and restarted the container, setting that variable in .env; nothing changed...

Do you have any app logs in Claper to share?

Do you mean the log i can obtain with `docker logs --follow e9e6c0a6cc8b '? Seems me contain nothing more then HTTP GET and WebSocket request.

Particulary, there's no SMTP/email row...

alxlion commented 3 weeks ago

Sorry for the late reply, I am trying to reproduce this and investigate