Opened 3 weeks ago

Last modified 10 days ago

#37166 closed New feature

System check for developer/test MAILERS in production — at Version 3

Reported by: Mike Edmunds Owned by: Vishy
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 Mike Edmunds)

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 (3)

comment:1 by Mike Edmunds, 3 weeks ago

Also, note that the Django 6.1 new project template creates a settings.py with MAILERS configured 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.)

comment:2 by Vishy, 3 weeks ago

Owner: set to Vishy
Status: newassigned

comment:3 by Mike Edmunds, 3 weeks ago

Description: modified (diff)

This should probably be an error system check, not warning. Updated the description.

Note: See TracTickets for help on using tickets.
Back to Top