From: Damien Lespiau Date: Sat, 26 Sep 2015 09:56:36 +0000 (+0100) Subject: settings: Also define SERVER_EMAIL for email logs X-Git-Tag: v1.1.0~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b5a953951321434894c7fd48a3c98053785856d;p=thirdparty%2Fpatchwork.git settings: Also define SERVER_EMAIL for email logs 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 Acked-by: Stephen Finucane --- diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index 89d30c95..ab03814f 100644 --- a/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -67,6 +67,7 @@ TEMPLATE_DIRS = ( # Email DEFAULT_FROM_EMAIL = 'Patchwork ' +SERVER_EMAIL = DEFAULT_FROM_EMAIL # # Auth settings diff --git a/patchwork/settings/production.example.py b/patchwork/settings/production.example.py index 7af79a7a..9cf6712e 100644 --- a/patchwork/settings/production.example.py +++ b/patchwork/settings/production.example.py @@ -34,6 +34,7 @@ ADMINS = ( ) DEFAULT_FROM_EMAIL = 'Patchwork ' +SERVER_EMAIL = DEFAULT_FROM_EMAIL NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL # Database