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

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 28, 2016, 22:14 UTC
Message-ID
<xmqq4m79qujr.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160728215603.GA22865@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>> ...  What is most worrysome is the latter
>> half of the last sentence.  Is it really "should not be", or is it
>> merely "use of this option is just a waste of time, as you would get
>> exactly the same result anyway"?  If it is the latter, that is fine.
>
> It does what you want, and omits the in-body header when it would be
> redundant.
OK, then I would no longer be worried about that one.
> I think the original reason I did not make "--from" the default is that
> I was worried about breaking consumers which do not know how to handle
> in-body headers.
That's a fair concern.
So going back to Josh's original problem description:
    While git-send-email knows how to change the patch mails to use your own
    address as "From:" and add a "From:" line to the body for the author,
    any other tool used to send emails doesn't do that.

I wonder how these "any other tool" (that reads the format-patch output, i.e. mbox file with one mail per file each, and sends each as a piece of e-mail, without paying attention who you, the tool's user, are and blindly send them with the original "From:" and other headers intact in the header part of the message) are used in the wild to send patch submissions. /usr/bin/mail or /usr/bin/Mail would not be among them, as I suspect they would place everything in the body part, and the would do so without stripping the "From " line that exists before each e-mail message.

Previous: Jeff KingNext: Josh Triplett
Message 4 of 19 in “[RFC] git-format-patch: default to --from to avoid spoofed mails?”
  1. Josh TriplettJul 28, 2016
  2. Junio C HamanoJul 28, 2016
  3. Jeff KingJul 28, 2016
  4. Junio C HamanoJul 28, 2016
  5. Josh TriplettJul 28, 2016
  6. Jeff KingJul 29, 2016
  7. Jeff KingJul 29, 2016
  8. Josh TriplettJul 29, 2016
  9. Jeff KingJul 29, 2016
  10. Josh TriplettJul 30, 2016
  11. Jeff KingJul 30, 2016
  12. Josh TriplettJul 30, 2016
  13. 0/2 format-patch: Transition the default to --from to avoid spoofed mailsJosh Triplett, Jul 30, 2016
  14. Junio C HamanoAug 1, 2016
  15. Jeff KingAug 1, 2016
  16. Junio C HamanoAug 1, 2016
  17. Josh TriplettJul 29, 2016
  18. Josh TriplettJul 29, 2016
  19. Junio C HamanoJul 29, 2016

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.