On Mon, Oct 10, 2016 at 04:00:56PM -0500, Larry Finger wrote:
> 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 <[email protected]> [4.8+] from line 'Cc:
> Stable <[email protected]> [4.8+]'
>
> That is correct, but the actual Cc list contains
> Stable <[email protected][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 <[email protected]> [4.8+]
EOF
If I then run:
git send-email -1 [email protected] --dry-run
I get:
/tmp/MH8SfHOjCv/0001-the-subject.patch
(mbox) Adding cc: Jeff King <[email protected]> from line 'From: Jeff King
<[email protected]>'
(body) Adding cc: Stable <[email protected]> [4.8+] from line 'Cc:
Stable <[email protected]> [4.8+]'
Dry-OK. Log says:
Sendmail: /usr/sbin/sendmail -i [email protected] [email protected]
From: Jeff King <[email protected]>
To: [email protected]
Cc: "Stable [4.8+]" <[email protected]>
Subject: [PATCH] the subject
Date: Mon, 10 Oct 2016 17:44:25 -0400
Message-Id: <[email protected]>
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