Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password reset emails not working #5878

Closed
kenspi opened this issue Feb 1, 2017 · 41 comments
Closed

Password reset emails not working #5878

kenspi opened this issue Feb 1, 2017 · 41 comments

Comments

@kenspi
Copy link

kenspi commented Feb 1, 2017

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) �[34mMeteor ➔ 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

@Isabello
Copy link

Isabello commented Feb 3, 2017

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

@engelgabriel
Copy link
Member

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

@kenspi
Copy link
Author

kenspi commented Feb 4, 2017 via email

@engelgabriel
Copy link
Member

@RocketChat/core ideas?

@cescgie
Copy link

cescgie commented Feb 7, 2017

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

@engelgabriel engelgabriel modified the milestones: 0.52.0, 0.53.0 Feb 14, 2017
@rasos
Copy link
Contributor

rasos commented Feb 24, 2017

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?

@pierreozoux
Copy link
Contributor

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

@kenspi
Copy link
Author

kenspi commented Feb 28, 2017

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

@kenspi kenspi closed this as completed Feb 28, 2017
@cescgie
Copy link

cescgie commented Mar 9, 2017

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

@teamsoo
Copy link

teamsoo commented Mar 21, 2017

@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: cbdc26d
Commit Branch: HEAD

Log
rocketchat_lib rocketchat_lib.js:1092 Meteor ➔ method sendForgotPasswordEmail -> userId: null , arguments: { '0': 'email@company.com' }

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

@cescgie
Copy link

cescgie commented Mar 23, 2017

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

@teamsoo
Copy link

teamsoo commented Mar 31, 2017

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

@geekgonecrazy
Copy link
Contributor

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

@teamsoo
Copy link

teamsoo commented Mar 31, 2017

@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

@geekgonecrazy
Copy link
Contributor

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

@teamsoo
Copy link

teamsoo commented Mar 31, 2017

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

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented Mar 31, 2017

@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 geekgonecrazy reopened this Mar 31, 2017
@pierreozoux
Copy link
Contributor

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

@cescgie
Copy link

cescgie commented Mar 31, 2017

@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

@teamsoo
Copy link

teamsoo commented Mar 31, 2017

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

@pierreozoux
Copy link
Contributor

@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:
#6196

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented Apr 2, 2017

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

@teamsoo
Copy link

teamsoo commented Apr 4, 2017

@pierreozoux @geekgonecrazy @cescgie

I changed From Email to just info@company.com and the reset password email works again. Thank you so much.

@teamsoo
Copy link

teamsoo commented Apr 4, 2017

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?

@arungcs
Copy link

arungcs commented May 2, 2017

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?

@teamsoo
Copy link

teamsoo commented May 2, 2017

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

@arungcs
Copy link

arungcs commented May 2, 2017

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

@sscholl
Copy link
Contributor

sscholl commented May 11, 2017

@arungcs same here
+1

@sscholl
Copy link
Contributor

sscholl commented May 17, 2017

this issue was closed via #6940 in 0.56.0 FOR ME

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

@midnightcodr
Copy link

midnightcodr commented Jun 26, 2017

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.

@geekgonecrazy
Copy link
Contributor

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

@midnightcodr
Copy link

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

@midnightcodr
Copy link

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

@pwilkin
Copy link

pwilkin commented Aug 1, 2017

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

@santhosh9
Copy link

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!

@teamsoo
Copy link

teamsoo commented Aug 22, 2017

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

@engelgabriel engelgabriel modified the milestones: 0.53.0, 0.60.0 Sep 23, 2017
@rodrigok
Copy link
Member

Are you guys still having problems with reset password email?

@teamsoo
Copy link

teamsoo commented Dec 22, 2017

My 0.59.3 deployment works fine. Thanks.

@rodrigok
Copy link
Member

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

@paulkernstock
Copy link

paulkernstock commented Dec 3, 2018

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

@paneda1998
Copy link

Hey
I have some problems with reset password

after i send request i didnt receive any email i check yahoo gmail hotmail and...
also there are no errors
just didnt receive any email...
i check spam too.

and for more details : in creating account i receive emails and everything is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests