﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2858	[patch] Better default value for SERVER_EMAIL	Fraser Nevett <mail@…>	nobody	"Neither ''mail_managers()'' nor ''mail_admins()'' allow you to specify the address from which their email should be sent, but instead use the value of SERVER_EMAIL from the settings file. This is fine, but the default is 'root@localhost'.

Some MTAs (such as Postfix) will automatically append a domain suffix to this, as it knows that 'localhost' won't resolve on the Internet and it tries to convert it into a fully qualified hostname (e.g. 'root@localhost' would become 'root@localhost.example.com').

As such a hostname will not usually exist, some email servers will reject messages from this sender as it assumes that it is a spoofed address.

Obviously, an easy solution is just to define SERVER_EMAIL to something sensible in your settings file! However, should you neglect (or forget) do do this, it would be nice if Django had a default value that was more likely to be a real email address.

The attached patch defines this variable using the machine's hostname.

A similar issue exists with DEFAULT_FROM_EMAIL, which the patch also addresses."	enhancement	closed	Core (Other)	dev	normal	wontfix			Design decision needed	1	0	0	0	0	0
