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

Emails not working since 0.56.0 (now "Invalid login")

Open Fscape opened this issue 9 years ago • 21 comments

Emails stopped working in 0.56.0 -- "Self-signed certificate" error. Server is using a Let's Encrypt cert.

Waited to try enable IgnoreTLS option in 0.57.0 -- now I'm getting an "Invalid login" error. The login is correct (not edited since it was working pre 0.56.0). Server has been restarted.

Not sure what I'm missing here... Would appreciate any help or direction. Thanks

Exception in defer callback: ` Error: Invalid login: 503 5.5.1 Error: authentication not enabled at Object.Future.wait (/snap/rocketchat-server/812/node_modules/fibers/future.js:449:15) at Mail.syncSendMail (packages/meteor.js:213:24) at smtpSend (packages/email.js:110:13) at Object.Email.send (packages/email.js:168:5) at Object.Email.send (packages/rocketchat_monitoring.js:3496:28) at /snap/rocketchat-server/812/programs/server/packages/rocketchat_lib.js:1664:14 at [object Object]..extend.withValue (packages/meteor.js:1122:17) at packages/meteor.js:445:45 at runWithEnvironment (packages/meteor.js:1176:24)

at SMTPConnection._formatError (/snap/rocketchat-server/812/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:558:19) at SMTPConnection._actionAUTHComplete (/snap/rocketchat-server/812/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:1254:34) at SMTPConnection. (/snap/rocketchat-server/812/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:341:26) at SMTPConnection._processResponse (/snap/rocketchat-server/812/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:707:20) at SMTPConnection._onData (/snap/rocketchat-server/812/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:510:14) at Socket. (/snap/rocketchat-server/812/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:462:47) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) at Socket.Readable.push (_stream_readable.js:111:10) at TCP.onread (net.js:540:20) `

Rocket.Chat Version: 0.57.1 (Ubuntu snap) Running Instances: 1 DB Replicaset OpLog: Enabled Node Version: v4.8.1

Fscape avatar Jul 06 '17 15:07 Fscape

I've since started using a different mailserver for emails. If nobody else is having this issue, it can probably be closed (May be a problem with my mail setup on localhost)

Fscape avatar Jul 07 '17 15:07 Fscape

same here for me, mail server using custom cert and new option https://github.com/RocketChat/Rocket.Chat/pull/7084 always gives "Invalid login"

andypost avatar Jul 08 '17 12:07 andypost

I can't confirm here with a "vanilla" sendmail offering no TLS/SSL. Curiously it's working with IgnoreTLS set to false or true.

localguru avatar Jul 10 '17 14:07 localguru

Thats same sound me so smtp not work now..??

FinFrn avatar Jul 13 '17 15:07 FinFrn

I face the same issue. Sending test mail always finishes with "invalid login" message. Version 0.58.2

avagulov avatar Sep 26 '17 12:09 avagulov

same issue here

andreas-bulling avatar Dec 12 '17 20:12 andreas-bulling

I have been having the same issue trying to configure SMTP for zoho and with gmail. Zoho, I do not get an errors, it just times out. Gmail I am getting invalid login

If I user port 587 I get an interesting error message: Error Error trying to send email: 140625064101696

port 465 get invalid login Port 25 times out

kvingedal avatar Dec 15 '17 04:12 kvingedal

same here, fwiw

port 587 brings error sending email, port 25 brings invalid login

andreas-it-dev avatar Dec 22 '17 19:12 andreas-it-dev

Same here. Invalid Login on docker mailserver with letsencrypt certificates.

Rocket.Chat Version: 0.60.2 NodeJS Version: 8.9.3 - x64 Platform: linux Process Port: 3000 ReplicaSet OpLog: Enabled Commit Hash: 2149a6c78d Commit Branch: HEAD

  • smtps -> Error 140382348367680

postfix/smtpd[301]: connect from unknown[172.19.0.1] postfix/smtpd[301]: lost connection after CONNECT from unknown[172.19.0.1] postfix/smtpd[301]: disconnect from unknown[172.19.0.1] commands=0/0

  • smtp -> ignore TLS yes -> Error Invalid Login

postfix/smtpd[289]: connect from unknown[172.19.0.1] postfix/smtpd[289]: lost connection after EHLO from unknown[172.19.0.1] postfix/smtpd[289]: disconnect from unknown[172.19.0.1] ehlo=1 auth=0/1 commands=1/2

  • smtp -> ignore TLS no -> Error: self signed cert error

postfix/smtpd[289]: connect from unknown[172.19.0.1] dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat dovecot: auth: Debug: passwd-file /etc/dovecot/users: Read 5 users in 0 secs dovecot: auth: Debug: auth client connected (pid=0) postfix/smtpd[289]: lost connection after STARTTLS from unknown[172.19.0.1] postfix/smtpd[289]: disconnect from unknown[172.19.0.1] ehlo=1 starttls=1 commands=2

Switching pool between yes and no doesn't change anything.

If the self signed cert error wasn't there, it should work with TLS i guess. At least it worked with Mattermost with the same settings...

jbbth avatar Jan 02 '18 15:01 jbbth

Same here, Can't connect to my zimbra 8.7.0

bse5 avatar Jan 17 '18 08:01 bse5

Having the same issues on version 0.60.4

kalmufti avatar Jan 23 '18 20:01 kalmufti

I have version 0.60.4 and email is work

Only install Postfix server is solved this me.. and port 587 no smtps. Server versio is Ubuntu 16.04 LTS

when you set smtp settings, the server must be restarted. So, dns setup and then install postfix

Picture smtp - settings https://iltasex.fi/img/smtp.png

Berttas avatar Jan 24 '18 09:01 Berttas

Same here.

LunaSquee avatar Feb 06 '18 16:02 LunaSquee

Same here.

lvnilesh avatar Mar 02 '18 04:03 lvnilesh

Just wanted to report that I fixed my issue, I was using catatnight docker image. I just installed postfix, configured the certs paths and it's all good now.

kalmufti avatar Mar 02 '18 16:03 kalmufti

@kalmufti hi is this what fix your problem? https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-16-04

eriock avatar Mar 18 '18 11:03 eriock

What if I'm using Google as my email do i still need to install postfix? anyone?

eriock avatar Mar 18 '18 14:03 eriock

I also can't get rocketchat to use my postfix server that is running on the same server. I'm using a let's encrypt certificate for it but even when I try to disable everything and it says that "mail command failed" but If I stop the rocketchat server and manually run mail in the terminal it works fine. There's nothing interesting in the rocketchat server output even with the highest level of logging.

In postfix logs I see this:

heinä 05 22:49:19 vps2.boostslair.com postfix/submission/smtpd[27286]: connect from localhost[127.0.0.1]
heinä 05 22:49:19 vps2.boostslair.com postfix/submission/smtpd[27286]: lost connection after EHLO from localhost[127.0.0.1]                                                                                       
heinä 05 22:49:19 vps2.boostslair.com postfix/submission/smtpd[27286]: disconnect from localhost[127.0.0.1] ehlo=1 mail=0/1 commands=1/2                                                                          
heinä 05 22:50:09 vps2.boostslair.com postfix/submission/smtpd[27286]: connect from vps2.boostslair.com[178.238.237.78]                                                                                           
heinä 05 22:50:09 vps2.boostslair.com postfix/submission/smtpd[27286]: lost connection after EHLO from vps2.boostslair.com[178.238.237.78]                                                                        
heinä 05 22:50:09 vps2.boostslair.com postfix/submission/smtpd[27286]: disconnect from vps2.boostslair.com[178.238.237.78] ehlo=1 auth=0/1 commands=1/2

and with authentication (discourse can use this just fine):

heinä 05 22:31:42 vps2.boostslair.com postfix/submission/smtpd[24865]: connect from vps2.boostslair.com[178.238.237.78]                                                                                            
heinä 05 22:31:42 vps2.boostslair.com postfix/submission/smtpd[24865]: lost connection after EHLO from vps2.boostslair.com[178.238.237.78]                                                                         
heinä 05 22:31:42 vps2.boostslair.com postfix/submission/smtpd[24865]: disconnect from vps2.boostslair.com[178.238.237.78] ehlo=1 auth=0/1 commands=1/2                                                            
heinä 05 22:34:04 vps2.boostslair.com postfix/submission/smtpd[25226]: connect from vps2.boostslair.com[178.238.237.78]                                                                                            
heinä 05 22:34:04 vps2.boostslair.com postfix/submission/smtpd[25226]: lost connection after EHLO from vps2.boostslair.com[178.238.237.78]                                                                         
heinä 05 22:34:04 vps2.boostslair.com postfix/submission/smtpd[25226]: disconnect from vps2.boostslair.com[178.238.237.78] ehlo=1 auth=0/1 commands=1/2

hhyyrylainen avatar Jul 05 '18 20:07 hhyyrylainen

I was able to get mail working by clearing the settings in rocket chat adding this environment variable:

MAIL_URL=smtp://user:[email protected]:587?tls.rejectUnauthorized=false

and then setting just the "from" field in the rocket chat email settings.

hhyyrylainen avatar Jul 06 '18 20:07 hhyyrylainen

Some solution to this problem. Notifications by mail can not be sent, the following errors are shown:

  • Error: Hostname / IP does not match certificate's altnames: "IP: x.x.x.x is not in the cert's list:

or

  • Error: Invalid login: 503 AUTH command used when not advertised

My mail server is external, hosted on HostPapa, but you do not have any problems with other clients connected to the mail server

Waiting for your help ...

Rocket.Chat Version 0.66.3

pvalarezo avatar Aug 07 '18 20:08 pvalarezo