Re: git should not use a default user.email config value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King wrote:

> Sorry to be unclear. I meant that treating /etc/mailname and gethostname
> differently might be justified on Debian under the logic "if you have
> /etc/mailname, that is a trustworthy address, and if you do not, then we
> cannot guess at a trustworthy address (because putting it in
> /etc/mailname is the accepted way to do so on Debian)".
>
> But such logic would not extend to other operating systems, where
> /etc/mailname does not have such a status.

I thought that on other operating systems people typically don't have
an /etc/mailname.  How does trusting the file when present hurt?

> I am guessing, too, about what people even put in /etc/mailname. If they
> relay mail from the machine to a smarthost, do they put the individual
> hostname into /etc/mailname? Or do they put in the domain name that
> represents a real deliverable address? If the former, then it is no
> better than gethostname anyway.

Debian policy explains:

	If your package needs to know what hostname to use on (for
	example) outgoing news and mail messages which are generated
	locally, you should use the file /etc/mailname. It will contain
	the portion after the username and @ (at) sign for email
	addresses of users on the machine (followed by a newline).

	Such a package should check for the existence of this file when
	it is being configured. If it exists, it should be used without
	comment, although an MTA's configuration script may wish to
	prompt the user even if it finds that this file exists. If the
	file does not exist, the package should prompt the user for the
	value (preferably using debconf) and store it in /etc/mailname as
	well as using it in the package's configuration. The prompt
	should make it clear that the name will not just be used by that
	package.

So on a properly configured Debian system, /etc/mailname contains
something appropriate to put after the @ sign in an email address
and the sysadmin expects it to be used for that.

As far as I can tell, to the extent that other distros support
/etc/mailname, it is only as a side effect of handling that Debian
requirement.  I don't think e.g. Fedora or Solaris systems typically
will have a /etc/mailname file.

I *am* a bit worried about what people might put in /etc/mailname on
Debian systems when there is no appropriate host to put there (as on
Thorsten's machine).

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]