[Django] #37166: System check for developer/test MAILERS in production

15 views
Skip to first unread message

Django

unread,
Jun 12, 2026, 7:39:25 PMJun 12
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+---------------------------------------
Reporter: Mike Edmunds | Type: New feature
Status: new | Component: Core (Mail)
Version: 6.1 | Severity: Normal
Keywords: checks | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Add a deployment-only system check that warns 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 a warning.)

This is recommended early follow-on work from
[https://github.com/django/deps/blob/main/accepted/0018-mailers.md#future-
system-checks DEP 0018]. See also #37161.
--
Ticket URL: <https://code.djangoproject.com/ticket/37166>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 12, 2026, 8:41:54 PMJun 12
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+--------------------------------------
Reporter: Mike Edmunds | Owner: (none)
Type: New feature | Status: new
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Comment (by Mike Edmunds):

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.)
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:1>

Django

unread,
Jun 14, 2026, 7:35:42 AM (13 days ago) Jun 14
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+--------------------------------------
Reporter: Mike Edmunds | Owner: Vishy
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by Vishy):

* owner: (none) => Vishy
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:2>

Django

unread,
Jun 15, 2026, 2:03:07 PM (12 days ago) Jun 15
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+--------------------------------------
Reporter: Mike Edmunds | Owner: Vishy
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------

Old description:

> Add a deployment-only system check that warns 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 a warning.)
>
> This is recommended early follow-on work from
> [https://github.com/django/deps/blob/main/accepted/0018-mailers.md
> #future-system-checks DEP 0018]. See also #37161.

New description:

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
[https://github.com/django/deps/blob/main/accepted/0018-mailers.md#future-
system-checks DEP 0018]. See also #37161.

--
Comment (by Mike Edmunds):

This should probably be an error system check, not warning. Updated the
description.
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:3>

Django

unread,
Jun 15, 2026, 2:25:46 PM (12 days ago) Jun 15
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+------------------------------------
Reporter: Mike Edmunds | Owner: Vishy
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by Jacob Walls):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:4>

Django

unread,
Jun 22, 2026, 3:19:49 PM (5 days ago) Jun 22
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+----------------------------------------
Reporter: Mike Edmunds | Owner: Mike Edmunds
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+----------------------------------------
Changes (by Mike Edmunds):

* owner: Vishy => Mike Edmunds

Comment:

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.
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:5>

Django

unread,
Jun 22, 2026, 4:35:25 PM (5 days ago) Jun 22
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+----------------------------------------
Reporter: Mike Edmunds | Owner: Mike Edmunds
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+----------------------------------------
Changes (by Mike Edmunds):

* has_patch: 0 => 1

Comment:

https://github.com/django/django/pull/21530
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:6>

Django

unread,
Jun 22, 2026, 4:42:56 PM (5 days ago) Jun 22
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+----------------------------------------
Reporter: Mike Edmunds | Owner: Mike Edmunds
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+----------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:7>

Django

unread,
Jun 22, 2026, 4:53:25 PM (5 days ago) Jun 22
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
------------------------------+----------------------------------------
Reporter: Mike Edmunds | Owner: Mike Edmunds
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+----------------------------------------
Changes (by Mike Edmunds):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:8>

Django

unread,
Jun 22, 2026, 9:52:45 PM (4 days ago) Jun 22
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Mike
| Edmunds
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:9>

Django

unread,
Jun 23, 2026, 12:18:20 AM (4 days ago) Jun 23
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Mike
| Edmunds
Type: New feature | Status: assigned
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution:
Keywords: checks | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Vishy):

It's fine. I was just waiting for
https://github.com/django/django/pull/21529 to be merged, to avoid
conflicts.
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:10>

Django

unread,
Jun 23, 2026, 7:52:23 AM (4 days ago) Jun 23
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Mike
| Edmunds
Type: New feature | Status: closed
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution: fixed
Keywords: checks | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"61e078ecab9a9e8de9d283adf9fa554b6a145ce8" 61e078e]:
{{{#!CommitTicketReference repository=""
revision="61e078ecab9a9e8de9d283adf9fa554b6a145ce8"
Fixed #37166 -- Added deploy system check for dev-only 'default' MAILERS.

Added mail.E001 deployment-only system check to detect one of Django's
not-for-production-use email backends in the "default" MAILERS entry.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:11>

Django

unread,
Jun 23, 2026, 7:53:43 AM (4 days ago) Jun 23
to django-...@googlegroups.com
#37166: System check for developer/test MAILERS in production
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Mike
| Edmunds
Type: New feature | Status: closed
Component: Core (Mail) | Version: 6.1
Severity: Normal | Resolution: fixed
Keywords: checks | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia <124304+nessita@…>):

In [changeset:"84eea8d325b3f55685a6b9fb562ccbf402e5dce5" 84eea8d]:
{{{#!CommitTicketReference repository=""
revision="84eea8d325b3f55685a6b9fb562ccbf402e5dce5"
[6.1.x] Fixed #37166 -- Added deploy system check for dev-only 'default'
MAILERS.

Added mail.E001 deployment-only system check to detect one of Django's
not-for-production-use email backends in the "default" MAILERS entry.

Backport of 61e078ecab9a9e8de9d283adf9fa554b6a145ce8 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37166#comment:12>
Reply all
Reply to author
Forward
0 new messages