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

Re: Formatting problem send_mail in version 2.10.0

From
Jeff King <peff@peff.net>
Date
Oct 10, 2016, 21:48 UTC
Message-ID
<20161010214856.fobd3jgsv2cnscs3@sigill.intra.peff.net>
In-Reply-To
<41164484-309b-bfff-ddbb-55153495d41a@lwfinger.net>
On Mon, Oct 10, 2016 at 04:00:56PM -0500, Larry Finger wrote:
Show 12 quoted lines
> I have recently switched to openSUSE Leap 42.2 and found that some of the
> features of send_mail no longer work. The problem occurs when trying to add
> information to a Cc to Stable.
> 
> The initial pass through the patch produces the output
> (body) Adding cc: Stable <stable@vger.kernel.org> [4.8+] from line 'Cc:
> Stable <stable@vger.kernel.org> [4.8+]'
> 
> That is correct, but the actual Cc list contains
>         Stable <stable@vger.kernel.org[4.8+]>,
> 
> The mangled address is not legal and the mail attempt fails.
I can't reproduce the problem with this simple setup:
	git init
	echo content >file && git add file
	git commit -F- <<-\EOF
	the subject
	the body
	Cc: Stable <stable@vger.kernel.org> [4.8+]
	EOF
If I then run:
	git send-email -1 --to=peff@peff.net --dry-run
I get:
	/tmp/MH8SfHOjCv/0001-the-subject.patch
	(mbox) Adding cc: Jeff King <peff@peff.net> from line 'From: Jeff King <peff@peff.net>'
	(body) Adding cc: Stable <stable@vger.kernel.org> [4.8+] from line 'Cc: Stable <stable@vger.kernel.org> [4.8+]'
	Dry-OK. Log says:
	Sendmail: /usr/sbin/sendmail -i peff@peff.net stable@vger.kernel.org
	From: Jeff King <peff@peff.net>
	To: peff@peff.net
	Cc: "Stable [4.8+]" <stable@vger.kernel.org>
	Subject: [PATCH] the subject
	Date: Mon, 10 Oct 2016 17:44:25 -0400
	Message-Id: <20161010214425.9761-1-peff@peff.net>
	X-Mailer: git-send-email 2.10.1.527.g93d4615
	
	Result: OK

So it looks like it parsed the address, and shifted the "4.8+" bit into the name, which seems reasonable. Does my example behave differently on your system? If not, can you see what's different between your real-world case and the example?

It might also be related to which perl modules are available. We'll use Mail::Address if you have it, but some fallback routines if you don't. They may behave differently.

Alternatively, if this used to work, you might try bisecting it.
-Peff
Previous: Larry FingerNext: Jeff King
Message 2 of 24 in “Formatting problem send_mail in version 2.10.0”
  1. Larry FingerOct 10, 2016
  2. Jeff KingOct 10, 2016
  3. Jeff KingOct 10, 2016
  4. Larry FingerOct 10, 2016
  5. Jeff KingOct 10, 2016
  6. Matthieu MoyOct 11, 2016
  7. Larry FingerOct 11, 2016
  8. Matthieu MoyOct 11, 2016
  9. Larry FingerOct 12, 2016
  10. Matthieu MoyOct 12, 2016
  11. Larry FingerOct 12, 2016
  12. Matthieu MoyOct 12, 2016
  13. Larry FingerOct 12, 2016
  14. Matthieu MoyOct 12, 2016
  15. Larry FingerOct 12, 2016
  16. Junio C HamanoOct 12, 2016
  17. Jeff KingOct 12, 2016
  18. Matthieu MoyOct 13, 2016
  19. parse_mailboxes: accept extra text after <...> addressMatthieu Moy, Oct 13, 2016
  20. Kevin DaudtOct 13, 2016
  21. Matthieu MoyOct 13, 2016
  22. Matthieu MoyOct 13, 2016
  23. Junio C HamanoOct 14, 2016
  24. Jeff KingOct 11, 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.