git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-send-email: RFC2822 compliant Message-ID

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 20, 2007, 20:18 UTC
Message-ID
<7vlkeetm5c.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<11823459011323-git-send-email-michael@ndrix.org>
Michael Hendricks <michael@ndrix.org> writes:
> RFC 2822 section 3.6.4 suggests that a "good method" for generating a
> Message-ID is to put the domain name of the host on the right-side of
> the "@" character.  Use Perl's Sys::Hostname to do the heavy lifting.
> This module has been in the Perl core since version 5.

Probably is a good idea for 50% of properly configured hosts. I think hosts can be configured so that hostname() already returns fqdn in which case your patch is fine but they can also be configured so that hostname() plus its domainname becomes fqdn, in which case it is probably not. In any case it is mere suggestion (not MUST nor even SHOULD), so we should judge its merits a bit carefully.

What happens if the machine you run send-email on does not have a valid hostname configured yet? People on home machines or laptops whose only contact outside are with their ISP mailservers should be able to send their patches without having to configure /etc/hostname, shouldn't they? Does Sys::Hostname die under some condition, such as "the host is not configured well enough"? If so I suspect the change to replace the existing one is not acceptable.

I think we should use something safe that gives reasonably unique identifier and the existing $message_id_from based method is one way to do so.

The message from vger mailmaster (DSM) suggests that somehow $message_id_from method returned an empty string. Maybe make your patch used as a fallback in such a case?

Finally could you resend this with your updated git-send-email? I suspect that this line in the mail header of your patch:

	Message-ID: <11823459011323-git-send-email-michael@ndrix.org>
should have read like so:
	Message-ID: <11823459011323-git-send-email@ndrix.org>
Previous: Michael HendricksNext: Junio C Hamano
Message 2 of 4 in “git-send-email: RFC2822 compliant Message-ID”
  1. git-send-email: RFC2822 compliant Message-IDMichael Hendricks, Jun 20, 2007
  2. Junio C HamanoJun 20, 2007
  3. Junio C HamanoJun 20, 2007
  4. Michael HendricksJun 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.