]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
settings: Also define SERVER_EMAIL for email logs
authorDamien Lespiau <damien.lespiau@intel.com>
Sat, 26 Sep 2015 09:56:36 +0000 (10:56 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 03:51:30 +0000 (03:51 +0000)
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@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@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/settings/base.py
patchwork/settings/production.example.py

index 89d30c95fee9c1bd9c5312e6b8e8f5c3f6be3796..ab03814f4e27d5b8a8059401110377bc52700cb9 100644 (file)
@@ -67,6 +67,7 @@ TEMPLATE_DIRS = (
 # Email
 
 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
+SERVER_EMAIL = DEFAULT_FROM_EMAIL
 
 #
 # Auth settings
index 7af79a7aa1d9d8a8e0c3ef6c2d65a5c8f2535b35..9cf6712ec1a19d6ef0cdb2a837610c49a8cfdd1c 100644 (file)
@@ -34,6 +34,7 @@ ADMINS = (
 )
 
 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
+SERVER_EMAIL = DEFAULT_FROM_EMAIL
 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
 
 # Database