Rocket.chat: Emails not working since 0.56.0 (now "Invalid login")

Created on 6 Jul 2017  Â·  21Comments  Â·  Source: RocketChat/Rocket.Chat

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

Most helpful comment

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

All 21 comments

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)

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

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

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

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

same issue here

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

same here, fwiw

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

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

Same here,
Can't connect to my zimbra 8.7.0

Having the same issues on version 0.60.4

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

Same here.

Same here.

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.

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

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

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.

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

Looks like solutions have been found. If anyone else has an issue please take a look at forum.

Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattlin picture mattlin  Â·  3Comments

Buzzele picture Buzzele  Â·  3Comments

amayer5125 picture amayer5125  Â·  3Comments

marceloschmidt picture marceloschmidt  Â·  3Comments

Kiran-Rao picture Kiran-Rao  Â·  3Comments