Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Password reset emails not working

Open kenspi opened this issue 9 years ago • 41 comments

When users try to reset their password via the "forgot your password" link, they see an error in their browser stating "Error trying to send email: Message delivery failed". The log only indicates this error: [34mI20170201-17:55:22.254(0) Meteor ➔ method sendForgotPasswordEmail -> userId: null , arguments: { '0': '<email_address_removed>' }

The SMTP settings have been tested and are functional (test emails work, new account notifications work).

Possibly related, when an admin creates a new account, the user cannot login using the password that was generated. If the password is manually set, the user still cannot login using the manual password.

Rocket.Chat Version: 0.50.1 Running Instances: 1 DB Replicaset OpLog: Disabled Node Version: runtime v.4.7.1

kenspi avatar Feb 01 '17 18:02 kenspi

Password reset is broken for certain providers for us as well. It works with gmail but not hotmail.

Isabello avatar Feb 03 '17 15:02 Isabello

Can you give more info? Are the users form a specific domain?

engelgabriel avatar Feb 04 '17 20:02 engelgabriel

Yes, the accounts are from the same domain, as is the main admin account. This domain is defined in the accepted domains setting.

kenspi avatar Feb 04 '17 20:02 kenspi

@RocketChat/core ideas?

engelgabriel avatar Feb 04 '17 22:02 engelgabriel

Mine is broken as well. I got this error:

Error trying to send email: Mail from command failed -501 Syntax error in parameters

SMTP test is working but reset password shows above error. I use sendgrid and docker.


Edit Another error appears when i try to verify other users as admin

Error trying to send email: connect ECONNREFUSED 85.128.128.99

cescgie avatar Feb 07 '17 12:02 cescgie

Password reset works here with 0.52 and our own SMTP server. However:

  • Sent link is neither clickable nor translated nor nicely formatted.
  • New password given needed to contain at least one number. Where are the password rules defined?

rasos avatar Feb 24 '17 10:02 rasos

Can you detail if you set up MAIL_URL or Admin settings for SMTP or both?

pierreozoux avatar Feb 28 '17 18:02 pierreozoux

I've since rebuilt the system from scratch using a conventional build rather than docker and it seems to be OK now.

kenspi avatar Feb 28 '17 20:02 kenspi

Thank you for all your responses. I have version 0.53.0 now and it seems work, but...

We have sent you an email with password reset instruction. If you do not receive an email shortly, please come back and try again.

i have tried couple times but i still don't get any email even i got above message

cescgie avatar Mar 09 '17 15:03 cescgie

@engelgabriel Mine isn't working now (it used to work long time ago. just received a report from user).

Snap Rocket.Chat Version: 0.53.0 NodeJS Version: 4.7.3 - x64 Platform: linux ReplicaSet OpLog: Disabled Commit Hash: cbdc26ded8 Commit Branch: HEAD

Log rocketchat_lib rocketchat_lib.js:1092 Meteor ➔ method sendForgotPasswordEmail -> userId: null , arguments: { '0': '[email protected]' }

Forgot password: Custom is False The SMTP setting is working OK. I received an email from Test SMTP Settings button

Error message: Image of Error

teamsoo avatar Mar 21 '17 08:03 teamsoo

Ok i finally found the problem. This is message that i got in my sendgrid from each email activity that had been blocked from sendgrid

Reason [XXXXXXX] Our system has detected that this message is not RFC 5322 compliant: 'From' header is missing. To reduce the amount of spam sent to Gmail, this message has been blocked. Please visit https://support.google.com/mail/?p=RfcMessageNonCompliant and review RFC 5322 specifications for more information.XXXXX - gsmtp

So... after i changed my email to another email EXCEPT GMAIL, i finally see all response messages from my rocket chat!!!

cescgie avatar Mar 23 '17 12:03 cescgie

@cescgie You're saying that RocketChat password reset email module might not support sending email from Gmail? Because I can send test email from SMTP setting page.

teamsoo avatar Mar 31 '17 02:03 teamsoo

It appears this is just a matter of an email header missing. Do you have a valid from address set @cescgie?

geekgonecrazy avatar Mar 31 '17 04:03 geekgonecrazy

@geekgonecrazy Hi, thanks for the reply. Can you also check my from address below.

Image of SMTP setting

The test email works fine with the configuration but not the forget password email.

Thanks

teamsoo avatar Mar 31 '17 04:03 teamsoo

Does the verification email send? When you sign up for a new account? You'll have to have verify emails turned on I believe

geekgonecrazy avatar Mar 31 '17 04:03 geekgonecrazy

@geekgonecrazy The Email Verification doesn't send to new user. Only welcome email with password was sent to user and the user can't login with the password (maybe it's because the Email Verification step doesn't work)

Please suggest.

teamsoo avatar Mar 31 '17 05:03 teamsoo

@RocketChat/core it appears that the emails that are sent via the accounts package are missing the from header we set in settings. Ideas?

I'm guessing the others work because we don't send via the account package.

geekgonecrazy avatar Mar 31 '17 05:03 geekgonecrazy

@teamsoo Can you try restarting your server after changing your emails details and try sending a forgot password email

pierreozoux avatar Mar 31 '17 10:03 pierreozoux

@teamsoo actually i only set my smtp via docker-compose.yml. Yes. I don't set my EMAIL FROM header because as far as i know there is no option to set your email from in rocket chat docker-compose.yml

cescgie avatar Mar 31 '17 13:03 cescgie

@pierreozoux I have both docker and snap version of rocket chat installed on 2 different machines. I tried restarting both and the forgot password still doesn't work on both instances.

The following error message keeps showing Error

Is it works on your system? Are you using Gmail?

teamsoo avatar Mar 31 '17 17:03 teamsoo