tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* executable sendemail.smtpserver and b4 --reflect
@ 2023-04-12 19:00 Nick Desaulniers
  2023-04-12 19:02 ` Nick Desaulniers
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Nick Desaulniers @ 2023-04-12 19:00 UTC (permalink / raw)
  To: icon; +Cc: tools, mjg59

Hi Konstantin,
I was following along
https://people.kernel.org/monsieuricon/introducing-b4-and-patch-attestation
eager to try using b4 to send a patch series.  When I got to

$ b4 send --reflect

it seems that my series was sent to the list, surprisingly!
https://lore.kernel.org/llvm/20230412-no_stackp-v1-0-46a69b507a4b@google.com/

Internally at my employer, I must use a command line utility to send
email outside of the blessed GUI.  As such, my ~/.gitconfig looks
like:

...
[user]
        name = Nick Desaulniers
        email = ndesaulniers@google.com
[sendemail]
        from = Nick Desaulniers <ndesaulniers@google.com>
        smtpserver = /usr/bin/sendgmr
...

From a discussion with you and Matthew on IRC, it sounds like this
company-internal sendgmr utility might not be respecting some header
b4 adds to the eml file (envelope-from?)?

I can file a bug internally, but I'm not well versed on how to clarify
precisely what's going wrong.  Is there anything to be done in b4
itself, or help me word such a report I can file internally?

I also noticed that my name wasn't being sent on the From: field to
LKML. I assume that's an orthogonal issue, but is there anything else
I should be doing there?
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
@ 2023-04-12 19:02 ` Nick Desaulniers
  2023-04-12 19:24 ` Konstantin Ryabitsev
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Nick Desaulniers @ 2023-04-12 19:02 UTC (permalink / raw)
  To: icon; +Cc: tools, mjg59

On Wed, Apr 12, 2023 at 12:00 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> Hi Konstantin,
> I was following along
> https://people.kernel.org/monsieuricon/introducing-b4-and-patch-attestation
> eager to try using b4 to send a patch series.  When I got to
>
> $ b4 send --reflect
>
> it seems that my series was sent to the list, surprisingly!
> https://lore.kernel.org/llvm/20230412-no_stackp-v1-0-46a69b507a4b@google.com/

Ah, forgot to attach the log of what I ran and observed from the
command line, in case that helps:
https://paste.debian.net/1277133/

>
> Internally at my employer, I must use a command line utility to send
> email outside of the blessed GUI.  As such, my ~/.gitconfig looks
> like:
>
> ...
> [user]
>         name = Nick Desaulniers
>         email = ndesaulniers@google.com
> [sendemail]
>         from = Nick Desaulniers <ndesaulniers@google.com>
>         smtpserver = /usr/bin/sendgmr
> ...
>
> From a discussion with you and Matthew on IRC, it sounds like this
> company-internal sendgmr utility might not be respecting some header
> b4 adds to the eml file (envelope-from?)?
>
> I can file a bug internally, but I'm not well versed on how to clarify
> precisely what's going wrong.  Is there anything to be done in b4
> itself, or help me word such a report I can file internally?
>
> I also noticed that my name wasn't being sent on the From: field to
> LKML. I assume that's an orthogonal issue, but is there anything else
> I should be doing there?
> --
> Thanks,
> ~Nick Desaulniers



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
  2023-04-12 19:02 ` Nick Desaulniers
@ 2023-04-12 19:24 ` Konstantin Ryabitsev
  2023-04-12 19:26 ` Kernel.org Bugbot
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Konstantin Ryabitsev @ 2023-04-12 19:24 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: icon, tools, mjg59

On Wed, Apr 12, 2023 at 12:00:09PM -0700, Nick Desaulniers wrote:
> $ b4 send --reflect
> 
> it seems that my series was sent to the list, surprisingly!
> https://lore.kernel.org/llvm/20230412-no_stackp-v1-0-46a69b507a4b@google.com/

Yes, this is bad, as the warning message specifically says that this won't
happen.

bugbot assign to me

> Internally at my employer, I must use a command line utility to send
> email outside of the blessed GUI.  As such, my ~/.gitconfig looks
> like:
> 
> ...
> [user]
>         name = Nick Desaulniers
>         email = ndesaulniers@google.com
> [sendemail]
>         from = Nick Desaulniers <ndesaulniers@google.com>
>         smtpserver = /usr/bin/sendgmr
> ...
> 
> From a discussion with you and Matthew on IRC, it sounds like this
> company-internal sendgmr utility might not be respecting some header
> b4 adds to the eml file (envelope-from?)?

What happens is that we expect that whatever we talk to will ignore the To/Cc
headers in the message and only send the message to the recipients specified
during the outer exchange (e.g. SMTP ignores anything in these headers and
only pays attention to the recipients passed in "RCPT TO"; the same is true
for actual "sendmail" command). 

The safe course of action is to bail on --reflect when we recognize that a
local executable is being used, because there is no guarantee that it will be
compatible with our expectations that To: and Cc: headers in the message will
be ignored.

> I can file a bug internally, but I'm not well versed on how to clarify
> precisely what's going wrong.  Is there anything to be done in b4
> itself, or help me word such a report I can file internally?

I'm not sure it's worth your effort for this particular case, as sendgmr
doesn't claim to be sendmail-compatible, it's a tool to use with
git-send-email and *deliberately* pays attention to To: and Cc: headers in the
message. To be sendmail-compatible, it would need to ignore To: and Cc:
headers in the message and only pay to recipients passed as command-line
arguments, unless -t is specified (e.g. see
https://man7.org/linux/man-pages/man8/sendmail.8.html).

> I also noticed that my name wasn't being sent on the From: field to
> LKML. I assume that's an orthogonal issue, but is there anything else
> I should be doing there?

Do you have "from = " set in your [sendemail] section?

-K

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
  2023-04-12 19:02 ` Nick Desaulniers
  2023-04-12 19:24 ` Konstantin Ryabitsev
@ 2023-04-12 19:26 ` Kernel.org Bugbot
  2023-04-12 19:39 ` Konstantin Ryabitsev
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Kernel.org Bugbot @ 2023-04-12 19:26 UTC (permalink / raw)
  To: ndesaulniers, icon, mjg59, tools

Hello:

This conversation is now tracked by Kernel.org Bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=217332

There is no need to do anything else, just keep talking.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (2 preceding siblings ...)
  2023-04-12 19:26 ` Kernel.org Bugbot
@ 2023-04-12 19:39 ` Konstantin Ryabitsev
  2023-04-19 18:15 ` b4: " Kernel.org Bugbot
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Konstantin Ryabitsev @ 2023-04-12 19:39 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: icon, tools, mjg59

On Wed, Apr 12, 2023 at 12:00:09PM -0700, Nick Desaulniers wrote:
> ...
> [user]
>         name = Nick Desaulniers
>         email = ndesaulniers@google.com
> [sendemail]
>         from = Nick Desaulniers <ndesaulniers@google.com>
>         smtpserver = /usr/bin/sendgmr

Oh, you actually provided what I was asking. I'll check why we're not putting
the full name into the From: header.

-K

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (3 preceding siblings ...)
  2023-04-12 19:39 ` Konstantin Ryabitsev
@ 2023-04-19 18:15 ` Kernel.org Bugbot
  2023-04-19 18:30 ` Konstantin Ryabitsev
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Kernel.org Bugbot @ 2023-04-19 18:15 UTC (permalink / raw)
  To: konstantin, icon, mjg59, ndesaulniers, tools

Konstantin Ryabitsev writes in commit eff3eca47b798a501d079f7d25165d0415551edc:

ez: do not trust local commands to properly reflect

As we just discovered, Google's sendgmr is not properly compatible with
sendmail flags, and will ignore addresses passed via the CLI, instead
always using the ones from the headers.

This is opposite to what --reflect is designed to do, so bail out with a
loud error, but give a way to override it via a custom variable.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217332
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>

(via https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=eff3eca47b79)
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (4 preceding siblings ...)
  2023-04-19 18:15 ` b4: " Kernel.org Bugbot
@ 2023-04-19 18:30 ` Konstantin Ryabitsev
  2023-04-28 18:34   ` Nick Desaulniers
  2023-04-19 18:31 ` b4: " Kernel.org Bugbot
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Konstantin Ryabitsev @ 2023-04-19 18:30 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: icon, tools, mjg59

On Wed, Apr 12, 2023 at 12:00:09PM -0700, Nick Desaulniers wrote:
> I also noticed that my name wasn't being sent on the From: field to
> LKML. I assume that's an orthogonal issue, but is there anything else
> I should be doing there?

I don't think it's b4 that is doing this. I think Matthew mentioned that
sendgmr will rewrite some headers to match your internal authentication,
perhaps that's what is replacing the From: header?

-K

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (5 preceding siblings ...)
  2023-04-19 18:30 ` Konstantin Ryabitsev
@ 2023-04-19 18:31 ` Kernel.org Bugbot
  2023-05-15 21:44 ` Kernel.org Bugbot
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Kernel.org Bugbot @ 2023-04-19 18:31 UTC (permalink / raw)
  To: icon, ndesaulniers, konstantin, mjg59, tools

ndesaulniers writes via Kernel.org Bugzilla:

Wonderful, thanks as always Konstantin!

View: https://bugzilla.kernel.org/show_bug.cgi?id=217332#c5
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-19 18:30 ` Konstantin Ryabitsev
@ 2023-04-28 18:34   ` Nick Desaulniers
  2023-04-28 18:46     ` Konstantin Ryabitsev
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Desaulniers @ 2023-04-28 18:34 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: icon, tools, mjg59

On Wed, Apr 19, 2023 at 11:30 AM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:
>
> On Wed, Apr 12, 2023 at 12:00:09PM -0700, Nick Desaulniers wrote:
> > I also noticed that my name wasn't being sent on the From: field to
> > LKML. I assume that's an orthogonal issue, but is there anything else
> > I should be doing there?
>
> I don't think it's b4 that is doing this. I think Matthew mentioned that
> sendgmr will rewrite some headers to match your internal authentication,
> perhaps that's what is replacing the From: header?

I see:

$ b4 send
...
Sending via "/usr/bin/sendgmr -i -f ndesaulniers@google.com"

Should this be using `/usr/bin/sendgmr -i -f 'Nick Desaulniers
<ndesaulniers@google.com>'`?
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: executable sendemail.smtpserver and b4 --reflect
  2023-04-28 18:34   ` Nick Desaulniers
@ 2023-04-28 18:46     ` Konstantin Ryabitsev
  0 siblings, 0 replies; 15+ messages in thread
From: Konstantin Ryabitsev @ 2023-04-28 18:46 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: icon, tools, mjg59

On Fri, Apr 28, 2023 at 11:34:23AM -0700, Nick Desaulniers wrote:
> > I don't think it's b4 that is doing this. I think Matthew mentioned that
> > sendgmr will rewrite some headers to match your internal authentication,
> > perhaps that's what is replacing the From: header?
> 
> I see:
> 
> $ b4 send
> ...
> Sending via "/usr/bin/sendgmr -i -f ndesaulniers@google.com"
> 
> Should this be using `/usr/bin/sendgmr -i -f 'Nick Desaulniers
> <ndesaulniers@google.com>'`?

No, the addresses passed via -f are for the envelope-from, not for the message
headers (the envelope-from is used during the SMTP negotiation and this is
where the message should bounce to if it's not delivered).

That said, I don't know how sendgmr works internally, and since it doesn't
claim to be sendmail-compatible, the flags and how it treats them can be
anything, really.

-K

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (6 preceding siblings ...)
  2023-04-19 18:31 ` b4: " Kernel.org Bugbot
@ 2023-05-15 21:44 ` Kernel.org Bugbot
  2023-05-15 21:49   ` Konstantin Ryabitsev
  2023-05-16 22:58 ` Kernel.org Bugbot
  2023-08-03 20:56 ` Kernel.org Bugbot
  9 siblings, 1 reply; 15+ messages in thread
From: Kernel.org Bugbot @ 2023-05-15 21:44 UTC (permalink / raw)
  To: konstantin, icon, ndesaulniers, mjg59, tools

ndesaulniers writes via Kernel.org Bugzilla:

I spoke with the maintainer of our internal `sendgmr` tool; they recommended that the `-t` flag be used.

https://man7.org/linux/man-pages/man8/sendmail.8.html

Can `b4 send` add `-t`?

View: https://bugzilla.kernel.org/show_bug.cgi?id=217332#c9
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-05-15 21:44 ` Kernel.org Bugbot
@ 2023-05-15 21:49   ` Konstantin Ryabitsev
  2023-05-15 23:02     ` Nick Desaulniers
  0 siblings, 1 reply; 15+ messages in thread
From: Konstantin Ryabitsev @ 2023-05-15 21:49 UTC (permalink / raw)
  To: Kernel.org Bugbot; +Cc: icon, ndesaulniers, mjg59, tools

On Mon, May 15, 2023 at 09:44:44PM +0000, Kernel.org Bugbot wrote:
> I spoke with the maintainer of our internal `sendgmr` tool; they recommended that the `-t` flag be used.
> 
> https://man7.org/linux/man-pages/man8/sendmail.8.html
> 
> Can `b4 send` add `-t`?

Sorry, I'm not sure why we'd want to do that. The purpose of "reflect" mode is
specifically NOT to send to to addresses in the message headers, only to the
addresses we pass on the command line. So, adding -t would be the opposite of
what we want to do.

-K

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-05-15 21:49   ` Konstantin Ryabitsev
@ 2023-05-15 23:02     ` Nick Desaulniers
  0 siblings, 0 replies; 15+ messages in thread
From: Nick Desaulniers @ 2023-05-15 23:02 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: Kernel.org Bugbot, icon, mjg59, tools

On Mon, May 15, 2023 at 2:50 PM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:
>
> On Mon, May 15, 2023 at 09:44:44PM +0000, Kernel.org Bugbot wrote:
> > I spoke with the maintainer of our internal `sendgmr` tool; they recommended that the `-t` flag be used.
> >
> > https://man7.org/linux/man-pages/man8/sendmail.8.html
> >
> > Can `b4 send` add `-t`?
>
> Sorry, I'm not sure why we'd want to do that. The purpose of "reflect" mode is
> specifically NOT to send to to addresses in the message headers, only to the
> addresses we pass on the command line. So, adding -t would be the opposite of
> what we want to do.

This is not for reflect mode; sorry for not clarifying.

>
> -K



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (7 preceding siblings ...)
  2023-05-15 21:44 ` Kernel.org Bugbot
@ 2023-05-16 22:58 ` Kernel.org Bugbot
  2023-08-03 20:56 ` Kernel.org Bugbot
  9 siblings, 0 replies; 15+ messages in thread
From: Kernel.org Bugbot @ 2023-05-16 22:58 UTC (permalink / raw)
  To: konstantin, icon, tools, ndesaulniers, mjg59

ndesaulniers writes via Kernel.org Bugzilla:

(In reply to Bugbot from comment #0)
> Nick Desaulniers <ndesaulniers@google.com> writes:
> I also noticed that my name wasn't being sent on the From: field to
> LKML. I assume that's an orthogonal issue, but is there anything else
> I should be doing there?

(In reply to Nick Desaulniers from comment #9)
> I spoke with the maintainer of our internal `sendgmr` tool; they recommended
> that the `-t` flag be used.
> 
> https://man7.org/linux/man-pages/man8/sendmail.8.html
> 
> Can `b4 send` add `-t`?

...specifically not when using --reflect? (Happy to file a second bug to track this second issue, since it's orthogonal to --reflect).

View: https://bugzilla.kernel.org/show_bug.cgi?id=217332#c12
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: b4: executable sendemail.smtpserver and b4 --reflect
  2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
                   ` (8 preceding siblings ...)
  2023-05-16 22:58 ` Kernel.org Bugbot
@ 2023-08-03 20:56 ` Kernel.org Bugbot
  9 siblings, 0 replies; 15+ messages in thread
From: Kernel.org Bugbot @ 2023-08-03 20:56 UTC (permalink / raw)
  To: konstantin, mjg59, tools, ndesaulniers, icon

ndesaulniers writes via Kernel.org Bugzilla:

I think https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=8382882b9fb6c50737b6e19198a259850527d2a6 resolves this issue for us.  Look forward to the formal release that contains that. Thanks Konstantin!

(I don't think I'm able to change the status of this report in bugzilla to Fixed)

View: https://bugzilla.kernel.org/show_bug.cgi?id=217332#c13
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-08-03 20:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 19:00 executable sendemail.smtpserver and b4 --reflect Nick Desaulniers
2023-04-12 19:02 ` Nick Desaulniers
2023-04-12 19:24 ` Konstantin Ryabitsev
2023-04-12 19:26 ` Kernel.org Bugbot
2023-04-12 19:39 ` Konstantin Ryabitsev
2023-04-19 18:15 ` b4: " Kernel.org Bugbot
2023-04-19 18:30 ` Konstantin Ryabitsev
2023-04-28 18:34   ` Nick Desaulniers
2023-04-28 18:46     ` Konstantin Ryabitsev
2023-04-19 18:31 ` b4: " Kernel.org Bugbot
2023-05-15 21:44 ` Kernel.org Bugbot
2023-05-15 21:49   ` Konstantin Ryabitsev
2023-05-15 23:02     ` Nick Desaulniers
2023-05-16 22:58 ` Kernel.org Bugbot
2023-08-03 20:56 ` Kernel.org Bugbot

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 NNTP newsgroup(s).