git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Jeff King <peff@peff.net>,
	Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>,
	Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>,
	git@vger.kernel.org
Subject: Re: Formatting problem send_mail in version 2.10.0
Date: Wed, 12 Oct 2016 13:53:52 -0700	[thread overview]
Message-ID: <xmqqtwch2srj.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <vpq8tttr2ps.fsf@anie.imag.fr> (Matthieu Moy's message of "Wed, 12 Oct 2016 17:45:03 +0200")

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

>>> If it's not in the body of the message, then where is it?
>>
>> This point is clarified in the thread
>> http://marc.info/?l=linux-wireless&m=147625930203434&w=2, which is
>> with my upstream maintainer.
>
> Which explicitly states that the syntax is not [$number], but # $number,
> right?

But I do not think that works, either.  Let's step back.

People write things like these

    Cc: Stable <stable@vger.kernel.org> # 4.8
    Cc: Stable <stable@vger.kernel.org> [4.8+]

in the trailer part in the body of the message.  Are these lines
meant to be usable if they appear as Cc: headers of an outgoing
piece of e-mail as-is?

That question has two subissues.

 * Are these RFC compliant?
 * Do real-world servers accept them?

I did a quick test with my e-mail provider, by sending a test
message with the above (with <stable@vger.kernel.org> replaced with
my address, of course) on Cc: and the answer to the second question
appears to be no.

When I send the former, I get this:

    550 5.1.1 <4.8>: Recipient address rejected: User unknown...'
    errormsg='recipient address 4.8 not accepted by the server'

The latter gives me this:

    550 5.1.1 <[4.8+]>: Recipient address rejected: User unknown...'
    errormsg='recipient address 4.8 not accepted by the server'

So even if these were accepted by some servers, it is not sane
to assume that these lines are meant to be copied to Cc: headers
when sending out.  "send-email --cc" needs to salvage these
malformed lines.

For me, it seems that I get correct envelope rcpt-to addresses for
both of them (i.e. "stable@vger.kernel.org" and nothing else appears
on the command line of sendmail invocation), even though I seem to
get a strange Cc: that are visible to humans:

    Cc: "Stable # 4 . 8" <stable@vger.kernel.org>,
        "Stable [4.8+]" <stable@vger.kernel.org>

I seem to have libmailtools-perl 2.12 on my system.

Just like Peff who tried to disable Mail::Address, it seems that
I get complaint on both of them.

"error: unable to extract a valid address from:" is followed by

    Stable <stable@vger.kernel.org#4.8>
    Stable <stable@vger.kernel.org[4.8+]>

which is not ideal.

If I were to issue a decree, I would say that people should stop
suggesting to put RFC-bogus things on the Cc: line.  As you
mentioned, things like:

    Cc: Stable (4.8+) <stable@vger.kernel.org>
    Cc: "Stable 4.8+" <stable@vger.kernel.org>

are perfectly readable alternative that are still RFC-kosher.

Things may have appeared to work by accident, and things may still
work by accident, depending on the vintage and availability of
Mail::Address package (which seems to be the case), but it is not
worth risking random breakages that depends on what other people
use in the first place, no?

That is, even though people seem to expect "send-email --cc" to
somehow be able to judge that " # 4.8" and " [4.8+]" are cruft not
meant as part of a valid address, I do not think it is a realistic
expectation.  How would it know "Cc: Stable <add@re.ss> 4.8, 4.9"
has garbage " 4.8, 4.9" that needs to be stripped, while "Cc: Stable
<add@re.ss> 4.8, torvalds@linux-foundation.org" has two valid
addresses that need to be CC'ed and " 4.8" is the only thing that is
unwanted?

I'd welcome to be proven wrong with a working patch that makes
"send-email --cc" to be hyper intelligent ;-), though.


  parent reply	other threads:[~2016-10-12 20:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 21:00 Formatting problem send_mail in version 2.10.0 Larry Finger
2016-10-10 21:48 ` Jeff King
2016-10-10 21:57   ` Jeff King
2016-10-10 23:35     ` Larry Finger
2016-10-10 23:43       ` Jeff King
2016-10-11  7:39     ` Matthieu Moy
2016-10-11 15:42       ` Larry Finger
2016-10-11 16:18         ` Matthieu Moy
2016-10-12  4:28           ` Larry Finger
2016-10-12  7:36             ` Matthieu Moy
2016-10-12 15:27               ` Larry Finger
2016-10-12 15:40                 ` Matthieu Moy
2016-10-12 15:40               ` Larry Finger
2016-10-12 15:45                 ` Matthieu Moy
2016-10-12 15:59                   ` Larry Finger
2016-10-12 20:53                   ` Junio C Hamano [this message]
2016-10-12 23:13                     ` Jeff King
2016-10-13  5:37                       ` Matthieu Moy
2016-10-13  5:47                         ` [PATCH] parse_mailboxes: accept extra text after <...> address Matthieu Moy
2016-10-13 15:33                       ` Formatting problem send_mail in version 2.10.0 Kevin Daudt
2016-10-13 16:05                         ` Matthieu Moy
2016-10-13  5:32                     ` Matthieu Moy
2016-10-14 17:04                       ` Junio C Hamano
2016-10-11 16:02       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtwch2srj.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=Mathieu.Lienard--Mayor@ensimag.imag.fr \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=remi.lespinet@ensimag.grenoble-inp.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).