Message ID | 1443276388-10502-3-git-send-email-damien.lespiau@intel.com |
---|---|
State | Superseded |
Headers | show |
> 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>
diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index d47cd6d..fd99b71 100644 --- a/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -67,6 +67,7 @@ TEMPLATE_DIRS = ( # email DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@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@patchwork.example.com>' +SERVER_EMAIL = DEFAULT_FROM_EMAIL NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL # Database
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> --- patchwork/settings/base.py | 1 + patchwork/settings/production.example.py | 1 + 2 files changed, 2 insertions(+)