Hello. We have been trying for quite a while to connect our email server to the rocketchat, but we keep getting an authorisation mistake (see log below). It might have to do with the fact that in the form one has to add user and password but it’s not very clear user and password of what. We have tried all possible combinations we could think of, but we are kind of out of ideas. Suggestions?
Thanks in advance.
Server Setup Information
Version of Rocket.Chat Server: CE 3.15.1
Operating System: ubuntu 20.04
Deployment Method: digitalocean IaaS
Number of Running Instances: 1
DB Replicaset Oplog:
NodeJS Version:
MongoDB Version:
Proxy:
Firewalls involved:
Log:
Exception in callback of async function: Error: Authentication failed. at Connection._resTagged (/opt/Rocket.Chat/programs/server/npm/node_modules/imap/lib/Connection.js:1502:11) at Parser. (/opt/Rocket.Chat/programs/server/npm/node_modules/imap/lib/Connection.js:194:10) at Parser.emit (events.js:314:20) at Parser.EventEmitter.emit (domain.js:483:12) at Parser._resTagged (/opt/Rocket.Chat/programs/server/npm/node_modules/imap/lib/Parser.js:175:10) at Parser._parse (/opt/Rocket.Chat/programs/server/npm/node_modules/imap/lib/Parser.js:139:16) at Parser._tryread (/opt/Rocket.Chat/programs/server/npm/node_modules/imap/lib/Parser.js:82:15) at TLSSocket.Parser.cbReadable (/opt/Rocket.Chat/programs/server/npm/node_modules/imap/lib/Parser.js:53:12) at TLSSocket.emit (events.js:314:20) at TLSSocket.EventEmitter.emit (domain.js:483:12) at emitReadable (_stream_readable.js:557:12) at processTicksAndRejections (internal/process/task_queues.js:83:21) { type: ‘no’, textCode: ‘AUTHENTICATIONFAILED’, source: ‘authentication’ }
I inserted the email server name (mail.wservices.ch) and ports (SMTP: 465
IMAP: 993) in the email configuration form. Then as credentials (user and password) I have tried several combinations, because it is not completely clear to me what user a password it is referred to. I assumed it was asked for the SSH credentials for the email server, so I tried those first, but it did not work. They I have tried all possibly relevant combinations, but still nothing. It seems that RocketChat actually sees the incoming emails, as it make new guest users when we get an email from somebody not in our contact book. This makes it more confusing to me, I am not sure where the error actually happens.
I don’t think I have access to the the email server logs, or at least I don’t know how to get them. However, the control panel is accessible also with an API key. Is there a way to bypass the user/password authorization and validate the email with an API call instead?
I just got this in logs of rocketchat
Exception in defer callback: [Error: 140323060795264:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332: ] { library: ‘SSL routines’, function: ‘ssl3_get_record’, reason: ‘wrong version number’, code: ‘ESOCKET’, command: ‘CONN’ }
The logs arrived delayed.
Do you suggest I consider using a dedicated email server?
I had actually considered it a few months ago, when I decided to ditch gmail for self-hosted email (for a number of reasons). Then I have opted for my current solution, which gives me more freedom but still takes care of some administration aspects for me. I was a bit hesitant with the idea of a dedicated email server, because I was worried I would have issues managing it properly.
However, since I have discovered RocketChat (about 2 months ago) I have sort of fell in love with it. Even though the several front-end bugs and the fact that getting a full grasp on all the aspects will require some extra time, I do see a lot of potential in RocketChat and it is certainly a much better fit with my short and long term plans than any other solution I have been tried so far. Therefore, I would like to put some serious effort in mastering it and make all adjustments that may be necessary to guarantee a smoother setup and a better experience for me, my collaborators and my employees.
Look like this refers to SSL v3 which I think is deprecated. I’m not sure if that is due to Rocket or your provider.
I’m also not convinced about your providers email settings.
IMAP 143 is insecure. POP3 is insecure.
SSL/TLS isn’t deprecated the last time I checked. So I am wondering about your email host.
Have you made sure you set the host and port 587 in the email server settings?
Yes running your own email server is not for the faint hearted for sure. However, I am wondering about the quality if your host - I can’t see any info on their site about email setup.
Glad you are enjoying Rocket!! We’ll see if we can get you running.
Hello,
I really don’t have any extra information that what I have already shared in the previous mails. I have also reported the problem to the hosting provider. What I have heard from him is that I need to make sure StartTLS is enforced, otherwise the request would be considered unsecure and automatically rejected, as I mentioned in the first mail.
@john.crisp In the meanwhile I have also set up a private email server. I still miss something because I have not managed to connect the email server to Rocket.Chat yet. However, on this server I have full control, so it should make it easier to find the issue (or change the setting of the email server appropriately if necessary). The email server is hosted at host.mail2space.net. The ports are:
IMAP: 993
POP: 995
SMTP: 587
There is a single email user on the server at the moment, which is maurizio@mail2space.net