#37166 closed New feature (fixed)
System check for developer/test MAILERS in production
| Reported by: | Mike Edmunds | Owned by: | Mike Edmunds |
|---|---|---|---|
| Component: | Core (Mail) | Version: | 6.1 |
| Severity: | Normal | Keywords: | checks |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Add a deployment-only system check that errors if the "default" MAILERS configuration uses the console, dummy, file, or locmem EmailBackend. (Any of Django's built-in backends that are documented as "not intended for use in production".)
The check should only consider the "default" configuration. (Having, e.g., a "test" or "archive" configuration that uses the file backend should not cause an error)
This is recommended early follow-on work from DEP 0018. See also #37161.
Change History (12)
comment:1 by , 3 weeks ago
comment:2 by , 3 weeks ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:3 by , 3 weeks ago
| Description: | modified (diff) |
|---|
This should probably be an error system check, not warning. Updated the description.
comment:4 by , 2 weeks ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:5 by , 10 days ago
| Owner: | changed from to |
|---|
Vishy we're trying to get this in before 6.1 beta, so I'm going to claim the ticket. Apologies if you had already started working on it.
comment:7 by , 10 days ago
| Patch needs improvement: | set |
|---|
comment:8 by , 10 days ago
| Patch needs improvement: | unset |
|---|
comment:9 by , 10 days ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:10 by , 10 days ago
It's fine. I was just waiting for https://github.com/django/django/pull/21529 to be merged, to avoid conflicts.
Also, note that the Django 6.1 new project template creates a settings.py with
MAILERSconfigured to use the console EmailBackend, as a reasonable development configuration. (And if that's accidentally left in place in production, the "no default mailer" check from #37161 wouldn't complain.)