The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 26

Make Rocketchat use certificate for secured SMTP server

Hi,

for one of my company’s customer we’re integrating Rocketchat in their architecture. They want to use their own SMTP server for email notifications, which:

  • Requires authentication (user and password)
  • Listen on port 25 even if it is a SMTPS mail server
  • requires a certificate for connecting

We are struggling with the third point. Is there a way in Rocketchat to make it use a certificate for connecting to that SMTP server?
If so, is it possible and how to inject that in a dockerized Rocketchat installation?

Thanks in advance.

Gianluca

Server Setup Information

  • Version of Rocket.Chat Server: 3.15.0
  • Operating System: Centos 7.9
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • MongoDB Version: 4.0

Hi!

I was checking the source code for your question, and searching for MAIL_URL I found this:

I think the best you can get right now is a mix and match of the following options:

rocketchat:
  ...
  environment:
    - MAIL_URL=smtps://user:password@smtp_server:25&secure=false&ignoreTLS=true

One could work around this requirement by setting up an smtp relay that will use the provided certificate and provide a smtp server that will work with Rocket.Chat.

1 Like

Hi! Thanks for your exhaustive reply.

Yes I I’ve thought about the smtp relay (postfix) on which I could use the certificate, but the customer asked if there was a native way to connect to their SMTP without the relay.

Since you confirmed me that the STMP relay is the only way, I will tell them this is the only workaround.

Thanks again