django/django — pull request #1752 by edevil (2013-10-15 15:19:27+00:00)
Title: Add configurable SMTP timeout.

This is related to https://code.djangoproject.com/ticket/21271

"When EmailBackend initializes SMTP objects it does not provide a timeout, and the default timeout is object() (no timeout). It would be sensible to provide some configurable timeout.
I've got bitten by this when using the AdminEmailHandler. My database went down, a lot of exceptions were generated and Django was trying to send emails. The SMTP server started not responding and the requests started blocking, until all my workers were used up. By then Django stopped serving requests. Basically, I was DoSed by my own SMTP server."