-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misbehaving clients are never disconnected #145
Comments
Merge #146 fixes the case when clients do not send data. Other cases need further consideration. One blunt method would be a time limit on the overall transaction. Slightly more clever mechanisms could time progress through each part of the SMTP transaction, count commands like NOOP etc. |
It seems to me that the blunt approach would be a great first step. If we tracked a misbehavior score on the clients somehow, and just start with a (configurable) time limit, then we could start adding other behaviors (e.g. repeated NOOPS, number of NOOPS per email/successful email, etc.) Then I think there may be a convenient choke point where we can just check the client score, and if they've exceeded the limit then we can disconnect them. There might be alternate approaches that also work! That's just the first thing that popped into my head 🙂 |
I agree on these. I have a server that accepts a lot of connections per day, and too many stay open because of DOS like servers connecting to mine. A combination of the following might help:
This would greatly help! |
-- this comment should've gone into the PR 😅 -- |
It's possible to exhaust resources on the server in a number of ways:
Eventually Python will run out of file handles and exceptions will occur in code that tries to open any file, socket, etc.
The text was updated successfully, but these errors were encountered: