Rocket.chat: Password reset emails not working

Created on 1 Feb 2017  Â·  40Comments  Â·  Source: RocketChat/Rocket.Chat

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

email support

Most helpful comment

Never mind, the problem was fixed by restarting the chat server.

All 40 comments

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

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

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

@RocketChat/core ideas?

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

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?

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

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

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

@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

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 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.

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

@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

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 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.

@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.

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

@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

@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 actually, don't use this kind of from, it is not supported, just use the email.
Can you also check server errors?

Here we are again losing time debugging this because the test email and the forgot password email are 2 different functions:
https://github.com/RocketChat/Rocket.Chat/issues/6196

Agreed if we get that merged and use the single method for all email sending I think the issue described here will go away

@pierreozoux @geekgonecrazy @cescgie

I changed From Email to just [email protected] and the reset password email works again. Thank you so much.

I was following this guide in https://rocket.chat/docs/administrator-guides/notifications/email

If those kind of from is not supported, maybe someone should update the document?

This doesn't seem to have been fixed in the most recent release (version 0.55.1). I tried all the suggestions here including the info@company ... SMTP test works just fine - but forgot password doesn't - gives me the syntax error message.

Any help or pointers on how to resolve?

My docker deployment is also 0.55.1
The forgot password works just fine. Can you show me your current SMTP configuration?

SMTP seems to be working fine (when I try "send a test mail to my user", I get the email)... it goes through my Mailgun.org account. Forgot password is the thing that doesn't work and I am not sure how to debug it...
screen shot 2017-05-02 at 1 22 42 pm

@arungcs same here
+1

this issue was closed via #6940 in 0.56.0 FOR ME

Go to Administation->E-Mail->SMTP->Protocol (smtps)

I have 0.56.0 using Amazon SES. Test email works but password reset gives me a slightly different error (no detail error message given):

Error trying to send email: Mail command failed

Settings:

Protocol: smtp
Port: 587

I also tried with the followings

Protocol: smtps
Port: 465

It makes no difference in the final result.

@midnightcodr we use Amazon SES and just rest my password on our community server.

One thing you might check... has the email been verified for the user you are trying with? Also, did they login with twitter oauth?

@geekgonecrazy The sender's email address has been verified. As a matter of fact, the same setting has been used in many programs without issues. We are not using twitter oauth for our chat server.

Never mind, the problem was fixed by restarting the chat server.

Had the same - restarting the server fixed the problem of the missing "From" header.

is there a particular link where I can get some help regarding this application and issues related to this?
I am waiting for someone to help me with the smtp issue, so that I can try pushing this to live.

thanks!

@santhosh9 try posting it on #support channel in https://demo.rocket.chat
The support team might be able to help.

Are you guys still having problems with reset password email?

My 0.59.3 deployment works fine. Thanks.

I'll close this issue, please let me know if you still have problems with reset password email and we can open it again.

I am actually having this error on this server:

+----------------------------------------------------------+
| SERVER RUNNING |
+----------------------------------------------------------+
| |
| Rocket.Chat Version: 0.71.1 |
| NodeJS Version: 8.11.3 - x64 |
| Platform: linux |
| Process Port: 3000 |
| Site URL: https://chat.xn--kernstck-c6a.com |
| ReplicaSet OpLog: Enabled |
| Commit Hash: e73dc78ffd |
| Commit Branch: HEAD |
+----------------------------------------------------------+

I also had the From field customized in in the E-Mail admin setting pane. When trying to reset a user's password, I got the error message "Mail command failed." on the client (browser, "Unknown error" on iOS client). When I reset the From-field everything is working as expected.

Additionally other e-mail-functions that I use (e.g. registration mail, test mail) do work, except the custom from field is not repected.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antn89 picture antn89  Â·  3Comments

zeigerpuppy picture zeigerpuppy  Â·  3Comments

danpospisil picture danpospisil  Â·  3Comments

djeber picture djeber  Â·  3Comments

mddvul22 picture mddvul22  Â·  3Comments