[PATCH 2/3] settings: Also define SERVER_EMAIL for email logs
Damien Lespiau
damien.lespiau at intel.com
Mon Sep 28 20:58:32 AEST 2015
Django can send emails to admins on 500 HTTP errors when DEBUG is false.
That looks handy. That mechanism uses SERVER_EMAIL for the From:
address, which defaults to root at localhost and can cause problems in the
email delivery.
Use the same address than DEFAULT_FROM_EMAIL by default.
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
Acked-by: Stephen Finucane <stephen.finucane at intel.com>
---
patchwork/settings/base.py | 1 +
patchwork/settings/production.example.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py
index 89d30c9..ab03814 100644
--- a/patchwork/settings/base.py
+++ b/patchwork/settings/base.py
@@ -67,6 +67,7 @@ TEMPLATE_DIRS = (
# Email
DEFAULT_FROM_EMAIL = 'Patchwork <patchwork at patchwork.example.com>'
+SERVER_EMAIL = DEFAULT_FROM_EMAIL
#
# Auth settings
diff --git a/patchwork/settings/production.example.py b/patchwork/settings/production.example.py
index 7af79a7..9cf6712 100644
--- a/patchwork/settings/production.example.py
+++ b/patchwork/settings/production.example.py
@@ -34,6 +34,7 @@ ADMINS = (
)
DEFAULT_FROM_EMAIL = 'Patchwork <patchwork at patchwork.example.com>'
+SERVER_EMAIL = DEFAULT_FROM_EMAIL
NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
# Database
--
2.1.0
More information about the Patchwork
mailing list