vriteio / vrite

Open-source developer content platform
https://vrite.io
Other
1.63k stars 65 forks source link

error: vrite-app | No email service configured #39

Closed ovizii closed 1 year ago

ovizii commented 1 year ago

I found this project on reddit: https://www.reddit.com/r/selfhosted/comments/16hm2z0/vrite_v020_opensource_collaborative_developer/ and have been following the discussion over there to get started.

I can't seem to get the SMTP service setup. All my docker contaienrs are sending through a postfix running locally which serves as a poroxy so no authentication is needed.

Here is my config:

SMTP_HOST=10.10.10.10
SMTP_PORT=25
#SMTP_USERNAME=
#SMTP_PASSWORD=
SMTP_SECURE=false

However the momnent I try to first register an account I see this error: vrite-app | No email service configured

areknawo commented 1 year ago

Currently, the SMTP_USERNAME and SMTP_PASSWORD are required to enable the SMTP service.

On a side note, I'm still working on the updates and fixes recommended in the post, including better logging to help with issues like this.

ovizii commented 1 year ago

can I leave them empty? I really haven't set up authentication as my postfix only accepts locally generated email and from my own containers.

areknawo commented 1 year ago

You can omit them entirely now (v0.2.1). Just make sure you're running the latest version.

ovizii commented 1 year ago

thanks, I'll try again tomorrow as "docker compose pull" does not seem to pull any new image right now.

ovizii commented 1 year ago

OK, I managed to pull the latest image, not sure how to verify if its v0.2.1 This is all I managed to figure out:

docker image list | grep vrite
ghcr.io/vriteio/vrite/api                       main            5dcbb2c29b63   13 minutes ago   196MB
ghcr.io/vriteio/vrite/collaboration             main            bba622ba2fe5   13 minutes ago   195MB
ghcr.io/vriteio/vrite/assets                    main            78fff9f72fb0   13 minutes ago   222MB
ghcr.io/vriteio/vrite/app                       main            fae524822ad2   2 weeks ago      237MB
ghcr.io/vriteio/vrite/api                       <none>          a3077b7b4acc   2 weeks ago      195MB
ghcr.io/vriteio/vrite/assets                    <none>          70bd6e1114e9   2 weeks ago      221MB
ghcr.io/vriteio/vrite/collaboration             <none>          069e6f55f3eb   2 weeks ago      194MB

Unfortunately I still get vrite-app | No email service configured with this .env file:

SMTP_HOST=10.10.10.10
SMTP_PORT=25
#SMTP_USERNAME=
#SMTP_PASSWORD=
SMTP_SECURE=false

I even tried manually adding these SMTP variables as environmental variables to vrite-app:

    environment:
      - SMTP_HOST=10.10.10.10
      - SMTP_PORT=25
      - SMTP_SECURE=false

will try another pull tomorrow

areknawo commented 1 year ago

Sorry for that. It appears there was an issue with the GitHub Action for image publishing. The new image should be released now, accessible via either the 0.2.1 or latest tags. You can monitor this here.

Let me know if this works now.

ovizii commented 1 year ago

I just did another pull, got the latest image versions and am now seeing this error when trying to register:

vrite-app       | [Error: 589BAF2F697F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
vrite-app       | ] {
vrite-app       |   library: 'SSL routines',
vrite-app       |   reason: 'wrong version number',
vrite-app       |   code: 'ESOCKET',
vrite-app       |   command: 'CONN'
vrite-app       | }

these are my SMTP settings:

SMTP_HOST=10.10.10.10
SMTP_PORT=25
#SMTP_USERNAME=
#SMTP_PASSWORD=
SMTP_SECURE=false

postfix logs of this connection attempt:

Sep 30 15:30:34 nas postfix/smtpd[3898371]: connect from unknown[172.16.27.5]
Sep 30 15:30:34 nas postfix/smtpd[3898371]: lost connection after CONNECT from unknown[172.16.27.5]
Sep 30 15:30:34 nas postfix/smtpd[3898371]: disconnect from unknown[172.16.27.5] commands=0/0
areknawo commented 1 year ago

Ok, that's some progress. 🙂 I think there was an issue with passing the SMTP_SECURE flag, now fixed in v0.2.2. This should resolve the SSL connection issue. Try to pull the latest image again.

ovizii commented 1 year ago

Thanks, problem solved, SMTP works now.