# SMTP failure not reported and too many login attempts on backlog clearing

**URL:** <https://meta.discourse.org/t/smtp-failure-not-reported-and-too-many-login-attempts-on-backlog-clearing/70732>\
**Category:** Product Support\
**Created:** [September 25, 2017, 1:38pm UTC](https://meta.discourse.org/t/smtp-failure-not-reported-and-too-many-login-attempts-on-backlog-clearing/70732 "2017-09-25T13:38:34Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![amalg](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@amalg](https://meta.discourse.org/u/amalg)\
**Post date:** [July 2, 2019, 1:31am UTC](https://meta.discourse.org/t/smtp-failure-not-reported-and-too-many-login-attempts-on-backlog-clearing/70732/19 "2019-07-02T01:31:51Z")

</div>

I just wanted to chime in here.. I have the same issue, but it’s more annoying than the OPs experience. I also use GSuite and have a separate “app password” configured for Discourse. I have noticed however the my problem is not due to email counts per day or SMTP rate limits. The forum this happened on was not doing hardly anything in terms of posts or digest emails or anything like that. What happens is, from time to time, an SMTP authentication fails.. this has something to do with a bug on Google’s side of things.. for a few minutes, once in a while (once ever 3-5 months anyway), SMTP authentications just fail for a few minutes. Normally, when I see this in my email client, I simply wait 5 minutes and try again and it’s magically working again. Well with Discourse, a failure just makes it mad.. even with just a few messages queued up, it starts going into overdrive, attempting to log in over and over and over for each message in the queue. The result is an SMTP authentication blitz that triggers a different brute force attack protection mechanism within gmail, and very quickly it simply stops processing login attempts and errors instead. So, at this point it really doesn’t matter if the password is correct and the gmail authentication problem resolves.. by this time you’re locked out because Discourse went bugnutz.

Forget rate limiting, instead focus on;

- improving efficiency; send multiple emails on a single TCP connection for starters.. this is standard and reduces active socket counts and network overhead.

- implementing a sensible incriminating retry delay wherein if an SMTP authentication fails, there is really no reason to try again in such a short time period. When SMTP authentication fails, either disable email sending and put an on-screen alert to the admin that smtp authentication has failed, or put a serious delay mechanism in place such that try 2 occurs 60 seconds later, try 3 in 5 minutes, try 4 in 30 minutes, etc.

So now I have to basically change my SMTP settings to disable email, then rebuild the app, then wait 24 hours, revert my settings, then rebuild again. Even a simple checkbox in admin settings to disable email sending would be 1000% better than this.

---

_[View the full topic](https://meta.discourse.org/t/smtp-failure-not-reported-and-too-many-login-attempts-on-backlog-clearing/70732)._
