First and foremost, I’d be personally fine with having a console handler as the built-in default.
But, for background purposes, I would like to address one specific point you made:
I disagree with this statement. Every server I run that has a need to send email has an associated instance of Postfix running, listening on localhost only, with the option of having IPTables controlling access to the port by UID of the sending process.
I do this for a variety of reasons:
-
Running postfix on my server allows me to send emails for my own use without needing to send them through a provider. (Mostly, I’m referring to error-related emails such as the HTTP 500 error emails.) Additionally, since those emails remain local, there’s less risk involved with sensitive data that may be in them.
- I also run Dovecot to allow for access to emails defined as remaining local. This gives me the ability to run a “staging” environment, where I can test processes that would send emails, but without those emails going anywhere.
-
Using a local connection improves the performance of the Django email functionality. It takes significantly less time to send an email from Django than if Django were connecting to an external email provider. Removing the authentication process from the connection further streamlines the operation.
-
If there’s any problem with the provider’s service or connecting to that service, Postfix will queue the messages and continue to try to send them. Meanwhile, from Django’s perspective, the emails have been successfully sent.
-
This also reduces the number of connections that need to be made to my email provider. Every Django process or thread is only sending locally. The local postfix connection only creates one connection to the email provider.
-
Adding Postfix to my email processing gives me yet one more option for tracking and monitoring email usage. The Postfix logs help me track how many emails are being sent and to whom. I also have the ability to prevent emails from going out after they have been generated.