toeverything / AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
https://affine.pro
Other
40.81k stars 2.64k forks source link

Cannot get the Mail Service to correctly configure #8408

Open tvtechdir opened 4 hours ago

tvtechdir commented 4 hours ago

What happened?

I've put all my email credentials in the Compose.yaml file but continue to get 501 Syntax errors in the log. On the screen I get a GraphQL Error, Too Many Requests. Otherwise it looks like I should be able to send email, both invites and email validations.

Screenshot 2024-09-26 at 7 49 27 PM

My Compose.yaml file:

services: affine: image: ghcr.io/toeverything/affine-graphql:stable container_name: affine_selfhosted command: ['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js'] ports:

Distribution version

Linux

What browsers are you seeing the problem on if you're using web version?

No response

Are you self-hosting?

Relevant log output

affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:39:45 AM    WARN [WorkspaceResolver] failed to send a26a2159-97a1-4a88-87d8-342f6ab61e39 invite email to ryan.andrews@fox.com, but successfully revoked permission: Error: Mail command failed: 501 Syntax error in parameters or arguments
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:39:45 AM   ERROR [WorkspaceResolver] failed to invite user
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:39:45 AM   ERROR [WorkspaceResolver] internal_server_error: An internal error occurred.
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:40:28 AM    WARN [WorkspaceResolver] failed to send a26a2159-97a1-4a88-87d8-342f6ab61e39 invite email to ryan.andrews@fox.com, but successfully revoked permission: Error: Mail command failed: 501 Syntax error in parameters or arguments
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:40:28 AM   ERROR [WorkspaceResolver] failed to invite user
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:40:28 AM   ERROR [WorkspaceResolver] internal_server_error: An internal error occurred.
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:40:28 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:41:29 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:42:30 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:43:31 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:44:32 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:45:33 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:46:34 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:47:03 AM VERBOSE [CacheInterceptor] cache blobs:a26a2159-97a1-4a88-87d8-342f6ab61e39 hit
affine_selfhosted  | [Nest] 117  - 09/27/2024, 2:47:17 AM   ERROR [GraphQL] Internal server error
affine_selfhosted  | Error: Mail command failed: 501 Syntax error in parameters or arguments
affine_selfhosted  |     at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:807:19)
affine_selfhosted  |     at SMTPConnection._actionMAIL (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1616:34)
affine_selfhosted  |     at SMTPConnection.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1085:18)
affine_selfhosted  |     at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:991:20)
affine_selfhosted  |     at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:772:14)
affine_selfhosted  |     at SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
affine_selfhosted  |     at TLSSocket.emit (node:events:519:28)
affine_selfhosted  |     at addChunk (node:internal/streams/readable:559:12)
affine_selfhosted  |     at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
affine_selfhosted  |     at Readable.push (node:internal/streams/readable:390:5)

Anything else?

No response

affine-issue-bot[bot] commented 4 hours ago

Issue Status: 🆕 *Untriaged

*🆕 Untriaged**

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

forehalo commented 4 hours ago

how about this

- MAILER_SENDER=my name myemail@domain.com
+ MAILER_SENDER=myemail@domain.com
tvtechdir commented 4 hours ago

I was in a rush, the myemail@domain.com was written with <> on either side. Not sure if that makes a differnce.

I'm savvy enough to be dangerous with docker compose, but not knowledgable. Do I even need the MAILER_SENDER environment?

tvtechdir commented 3 hours ago

how about this

- MAILER_SENDER=my name myemail@domain.com
+ MAILER_SENDER=myemail@domain.com

Still getting 501 Syntax errors.

forehalo commented 3 hours ago

yes, MAILER_USER is used to authenticate the mailer service, MAILER_SENDER is the mail shown in sender