SMTP Verification Emails not working

Description

Hey, my SMTP server seems to be working, but Rocket.chat can’t send verification or test emails.

I have noticed that I have a delay of about 40 seconds when sending emails and about 2 Minutes for receiving emails (tested with thunderbird).

Log:

Exception in defer callback: Error: Greeting never received at SMTPConnection._formatError (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:784:19) at SMTPConnection._onError (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:770:20) at Timeout. (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:704:22) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7) { code: ‘ETIMEDOUT’, command: ‘CONN’ }

Server Setup Information

  • Version of Rocket.Chat Server: 5.0.4
  • Operating System: Debian 11
  • Deployment Method: tar ( manual )
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v14.20.0
  • MongoDB Version: 4.4.16
  • Proxy: reverse Proxy Nginx
  • Firewalls involved: ufw

Any additional Information

Protocol: smtps
Port: 465

Also Missing description:
image

Fixed:

IN
/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js

changed to “const GREETING_TIMEOUT = 35 * 1000;” // how much to wait after connection is established but SMTP greeting is not receieved

My STMP Server reacts a bit slow but the changed worked!

Hi, check this for a solution that do not change codebase: