RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.55k stars 10.58k forks source link

Emails not queued and ignored when sending limit reached #32313

Open reetp opened 6 months ago

reetp commented 6 months ago

Description:

Emails server setup using Authenticated SMTPS to localhost email server on port 465

The email server limits connections to 5 per IP as a security device.

If Rocket sends say 40 email notifications this overloads the server but Rocket does nothing - doesn't queue the mails or send an error.

It just seems to fire and forget.

Steps to reproduce:

Setup Email server with authenticated login on port 465 Set Max Connections per IP to 5 Ping @all or similar

Expected behavior:

All mails should be sent - those that the sender rejects should be queued and resent Unsent mails should throw an error.

Actual behavior:

Notification emails get limited to 5 and the rest rejected and never sent. Rocket gives no information on this.

Server Setup Information:

Mail server log can be supplied on request.

geekgonecrazy commented 6 months ago

Adding a queue is a bit of work... Maybe we should accept option or detect connection limit and handle like connection pool instead.

reetp commented 6 months ago

It should at least notify the user that the mails have not gone.

I had wrongly assumed that they were sent. It was only by checking my mail logs that I finally realised they weren't!

A connection limit may not be easy to detect as there are multiple mail transports out there.

A 'Limit' option may be better?

reetp commented 5 months ago

This is under investigation.

devanshkansagra commented 5 months ago

Hey, could you please provide a preview for that? for better clearence

rgvkulkarni commented 5 months ago

please assign this issue to me

reetp commented 5 months ago

Bugs are not usually assigned.

You can work on what you want and add your PR.

Note that this is quite complex and probably involves quite a bit of backend work.

I am liaising with the dev team.

There are easier bugs to look at.