Skip to content
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

SMTP does not work... #112

Open
marcogaio opened this issue Oct 14, 2024 · 8 comments
Open

SMTP does not work... #112

marcogaio opened this issue Oct 14, 2024 · 8 comments

Comments

@marcogaio
Copy link

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
Copy link
Contributor

alxlion commented Oct 19, 2024

Ciao Marco!

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

  • You request a password change
  • Add a facilitator when you edit/create an event

Have you tried this to test your smtp configuration?

@marcogaio
Copy link
Author

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

MAIL_TRANSPORT=smtp
[email protected]
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
Copy link
Author

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
Copy link
Contributor

alxlion commented Oct 19, 2024

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
Copy link
Author

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
Copy link
Contributor

alxlion commented Oct 20, 2024

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
Copy link
Author

marcogaio commented Oct 20, 2024

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
Copy link
Contributor

alxlion commented Oct 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants