synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Registration via email fails: emails not delivered; element-web reports "Not Found"

Open vanovarderesyan opened this issue 4 years ago • 15 comments

Hi. I want to authenticate the registration process with email in order for users to get confirmation emails. Currently, I added the email field in the registration form, however, when the email is sent, It is not actually delivered. It shows Not Found error. Please, let me know what should I setup in setting in order to solve this issue. Or if there is such an example, please, send me for checking. Thanks in advance. image

vanovarderesyan avatar May 16 '22 13:05 vanovarderesyan

when the email is sent, It is not actually delivered.

Are there any errors related to emails in your server's logs? Try looking for where /register request is handled in the logs.

In your Chrome screenshot, the register request is red, which usually indicates an error. What was its status code?

Have you made any recent/relevant changes to Synapse config? If so, please share.

DMRobertson avatar May 16 '22 13:05 DMRobertson

image

image Via these screenshots you will see from where the issue comes. Yes, I did changes in configs but I am not sure that I have done what was exactly requested and if it's not hard for you, could you please tell me which lines should I remove from the comment for these all to work correctly.

vanovarderesyan avatar May 16 '22 13:05 vanovarderesyan

image

vanovarderesyan avatar May 16 '22 14:05 vanovarderesyan

@vanovarderesyan you have posted a screenshot of a plaintext password (and a session ID). I hope that's an example password rather than one you actually use. If you do use it, I suggest changing it immediately.

In order to understand where "Not Found" comes from, we'll need logs from Synapse. We won't be able to make progress without those.

For the config: there might be hints in Synapse's configuration manual.

DMRobertson avatar May 16 '22 15:05 DMRobertson

image @DMRobertson thank you for the information. After resolving configs, the error has been changed (see screenshot). Can you please tell me now what's the problem?

vanovarderesyan avatar May 17 '22 06:05 vanovarderesyan

image

image

allowed_local_3pids After changing this key\s value in the configs, I again got the not found error which probably means that the previous problem remains.

vanovarderesyan avatar May 17 '22 06:05 vanovarderesyan

As per https://github.com/matrix-org/synapse/issues/12741#issuecomment-1127845272, I'll need logs from Synapse to understand what the problem is. The logging config should tell you where to look for log files.

DMRobertson avatar May 17 '22 12:05 DMRobertson

image

I think these are the logs that you may need to check. Are there fixed configs for email verification that I can use? If there are by any chance, please, send them to me.

vanovarderesyan avatar May 17 '22 12:05 vanovarderesyan

@vanovarderesyan It looks to me like the issue is with the double slash in the URL at the line that says Received response to POST ....

I feel like you might have something like this in your configuration file:

        account_threepid_delegates:
            email: http://matrix-interview.com/

Note the trailing slash at the end of the domain. If that's what you have then this is where your issue lies. If you remove it (i.e. set this value to http://matrix-interview.com, with no trailing slash) then it should hopefully work.

babolivier avatar May 17 '22 13:05 babolivier

image

image

image

Thank you for replying, however, I have made modifications based on your suggestions, but it didn't bring many results.

vanovarderesyan avatar May 17 '22 13:05 vanovarderesyan

I see. I assume you are running Sydent on that domain (alongside Synapse), but a 404 on that route leads me to believe that your reverse proxy might not be configured to proxy requests to Sydent. I suggest checking your reverse proxy configuration to check whether that is the case.

babolivier avatar May 17 '22 13:05 babolivier

python3 -m synapse.app.homeserver --server-name "localhost:8081" --config-path "8081.config" --report-stats no

I am runnin everything only with this one, and connecting the domain with the help of a proxy from Nginx

When I am inputting a wrong email, I am getting an error from that URL. You can see those in the above-shown screenshots..

vanovarderesyan avatar May 17 '22 13:05 vanovarderesyan

If you're not running Sydent alongside Synapse on this domain, you should not be using account_threepid_delegates but instead configure an email server in the email configuration section. As the documentation says, account_threepid_delegates should only be used to point to a running identity server (which Synapse isn't).

babolivier avatar May 17 '22 13:05 babolivier

Thank you very much. As both of them were activated, that is why it wasn't looking at SMTP configs.

vanovarderesyan avatar May 17 '22 13:05 vanovarderesyan

Cool, since it sounds like this was the source of the issue I'm going to close it then :slightly_smiling_face: Feel free to shout if it's still not resolved, and for other support questions feel free to use #synapse:matrix.org, which is our preferred medium for support.

babolivier avatar May 17 '22 14:05 babolivier