Skip to contentSkip to conversation

b4: fix from header not using real name

PATCH In review Justin Stitt 5 participants 18 messages Jul 27, 2023 – Aug 3, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b4: fix from header not using real name

When using b4 send there seems to be an issue with the real name not being included in the From: header.

Here's an example:
| From: [email protected]

Whereas, something like the following is preferred:
| From: Justin Stitt <[email protected]>

This patch fixes this issue and achieves the preferred behavior (above) by properly using both parts of a user's from field from their config.

A .gitconfig like this now properly works
| [sendemail]
| from = Justin Stitt <[email protected]>

It should be noted that myself and Nick (reported this issue) use an internal smtpserver called sendgmr. I'm not sure if this is a non-issue on other smtpservers but the fix I've outlined in this patch looks universal for locally-ran smtp commands.

---
 b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
b4/__init__.py +1 -1
index b974642..760ba33 100644
@@ -3259,7 +3259,7 @@ def get_smtp(dryrun: bool = False) -> Tuple[Union[smtplib.SMTP, smtplib.SMTP_SSL
         else:
             envpair = email.utils.parseaddr(fromaddr)
         if envpair[1]:
-            smtp += ['-f', envpair[1]]
+            smtp += ['-f', f"{envpair[0]} <{envpair[1]}>"]
         return smtp, fromaddr
 
     encryption = sconfig.get('smtpencryption')

---
base-commit: 099c9b47b39b6076752b8c757872080fad8fae56
change-id: 20230727-fix-from-header-c81940de575b

Best regards,
--
Justin Stitt <[email protected]>

#1 lore raw
Quoted 12 lines · Justin Stitt

When using b4 send there seems to be an issue with the real name not being included in the From: header.

Here's an example:
| From: [email protected]

Whereas, something like the following is preferred:
| From: Justin Stitt <[email protected]>

This patch fixes this issue and achieves the preferred behavior (above) by properly using both parts of a user's from field from their config.

Quoted 8 lines

A .gitconfig like this now properly works
| [sendemail]
| from = Justin Stitt <[email protected]>

It should be noted that myself and Nick (reported this issue) use an internal smtpserver called sendgmr. I'm not sure if this is a non-issue on other smtpservers but the fix I've outlined in this patch looks universal for locally-ran smtp commands.

I wonder if this breaks other non-sendgmr use cases and as such this patch should take on a different form. One such idea is checking specifically for sendgmr usage and adjusting the -f flag as such.

Quoted 30 lines
---
 b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
b4/__init__.py +1 -2
index b974642..760ba33 100644
@@ -3259,7 +3259,7 @@ def get_smtp(dryrun: bool = False) -> Tuple[Union[smtplib.SMTP, smtplib.SMTP_SSL
         else:
             envpair = email.utils.parseaddr(fromaddr)
         if envpair[1]:
-            smtp += ['-f', envpair[1]]
+            smtp += ['-f', f"{envpair[0]} <{envpair[1]}>"]
         return smtp, fromaddr
 
     encryption = sconfig.get('smtpencryption')
 
---

base-commit: 099c9b47b39b6076752b8c757872080fad8fae56
change-id: 20230727-fix-from-header-c81940de575b

Best regards,
--
Justin Stitt <[email protected]>

#2 lore raw
In reply to Justin Stitt
Quoted 8 lines · Justin Stitt

When using b4 send there seems to be an issue with the real name not being included in the From: header.

Here's an example:
| From: [email protected]

Whereas, something like the following is preferred:
| From: Justin Stitt <[email protected]>

Hmm. There are actually two "From" fields. There's envelope sender "From" (which is what -f sets), and the in-body "From:" field. I wonder if b4 isn't constructing the in-body From: field, and when missing, the MUAs add it based on the -f flag?

Quoted 6 lines

This patch fixes this issue and achieves the preferred behavior (above) by properly using both parts of a user's from field from their config.

A .gitconfig like this now properly works
| [sendemail]
| from = Justin Stitt <[email protected]>

Perhaps what's needed is this (which is what I've been using forever):

[sendemail]
envelopesender = auto

Signature · 1 line
Kees Cook
#3 lore raw
Quoted 16 lines · Kees Cook
Quoted 8 lines · Justin Stitt

When using b4 send there seems to be an issue with the real name not being included in the From: header.

Here's an example:
| From: [email protected]

Whereas, something like the following is preferred:
| From: Justin Stitt <[email protected]>

Hmm. There are actually two "From" fields. There's envelope sender "From" (which is what -f sets), and the in-body "From:" field. I wonder if b4 isn't constructing the in-body From: field, and when missing, the MUAs add it based on the -f flag?

Quoted 3 lines

This patch fixes this issue and achieves the preferred behavior (above) by properly using both parts of a user's from field from their config.

Quoted 8 lines
Quoted 3 lines

A .gitconfig like this now properly works
| [sendemail]
| from = Justin Stitt <[email protected]>

Perhaps what's needed is this (which is what I've been using forever):

[sendemail]
envelopesender = auto

Thanks for the tip; I'll give that a shot. Do you have from set under [sendemail] as well or no?

Quoted 5 lines

--
Kees Cook

Signature · 2 lines
Thanks,
~Nick Desaulniers
#4 lore raw
Quoted 21 lines · Nick Desaulniers
Quoted 20 lines · Kees Cook
Quoted 8 lines · Justin Stitt

When using b4 send there seems to be an issue with the real name not being included in the From: header.

Here's an example:
| From: [email protected]

Whereas, something like the following is preferred:
| From: Justin Stitt <[email protected]>

Hmm. There are actually two "From" fields. There's envelope sender "From" (which is what -f sets), and the in-body "From:" field. I wonder if b4 isn't constructing the in-body From: field, and when missing, the MUAs add it based on the -f flag?

Quoted 6 lines

This patch fixes this issue and achieves the preferred behavior (above) by properly using both parts of a user's from field from their config.

A .gitconfig like this now properly works
| [sendemail]
| from = Justin Stitt <[email protected]>

Quoted 7 lines
Quoted 4 lines

Perhaps what's needed is this (which is what I've been using forever):

[sendemail]
envelopesender = auto

Thanks for the tip; I'll give that a shot. Do you have from set under [sendemail] as well or no?

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

FWIW, my MUA is postfix. (Though actually, I guess, it's the MTA, b4 or git is the MUA... whatever. The thing I hand off to is postfix.)

For the relevant ~/.gitconfig settings, I have:

[user]
email = [email protected]
name = Kees Cook
[sendemail]
envelopesender = auto
confirm = auto

Signature · 1 line
Kees Cook
#5 lore raw
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

-K

#6 lore raw
Quoted 10 lines · Konstantin Ryabitsev
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

Do you think a patch to b4 specifically catered to sendgmr is the right call here? If not, I can hold onto my patch locally and use it for my purposes + anyone else who wants it.

Quoted 2 lines

-K

#7 lore raw
In reply to Konstantin Ryabitsev
Quoted 10 lines · Konstantin Ryabitsev
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

Going back and forth between the maintainer of sendgmr here...

I don't think you ever responded to my question of -t:
https://bugzilla.kernel.org/show_bug.cgi?id=217332#c9

Specifically NOT REFLECT MODE.

Quoted 2 lines

-K

Signature · 2 lines
Thanks,
~Nick Desaulniers
#8 lore raw
Quoted 10 lines · Nick Desaulniers
Quoted 7 lines · Konstantin Ryabitsev
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

Quoted 8 lines
Quoted 3 lines

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

Going back and forth between the maintainer of sendgmr here...

I don't think you ever responded to my question of -t:
https://bugzilla.kernel.org/show_bug.cgi?id=217332#c9

FWIW, I tried manually adding -t from inside of b4 and it did _not_ fix the issue. sendgmr still botched the From: header.

Quoted 11 lines

Specifically NOT REFLECT MODE.

Quoted 2 lines

-K

--
Thanks,
~Nick Desaulniers

#9 lore raw

+Sterling (maintainer of sendgmr)

Quoted 16 lines · Justin Stitt
Quoted 14 lines · Nick Desaulniers
Quoted 10 lines · Konstantin Ryabitsev
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

Quoted 6 lines
Quoted 4 lines

Going back and forth between the maintainer of sendgmr here...

I don't think you ever responded to my question of -t:
https://bugzilla.kernel.org/show_bug.cgi?id=217332#c9

FWIW, I tried manually adding -t from inside of b4 and it did _not_ fix the issue. sendgmr still botched the From: header.

Hmm...I should probably reopen our internal ticket for this then...

Quoted 12 lines
Quoted 12 lines

Specifically NOT REFLECT MODE.

Quoted 2 lines

-K

--
Thanks,
~Nick Desaulniers

Signature · 2 lines
Thanks,
~Nick Desaulniers
#10 lore raw
In reply to Justin Stitt
Quoted 16 lines · Justin Stitt
Quoted 14 lines · Nick Desaulniers
Quoted 10 lines · Konstantin Ryabitsev
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

Quoted 6 lines
Quoted 4 lines

Going back and forth between the maintainer of sendgmr here...

I don't think you ever responded to my question of -t:
https://bugzilla.kernel.org/show_bug.cgi?id=217332#c9

FWIW, I tried manually adding -t from inside of b4 and it did _not_ fix the issue. sendgmr still botched the From: header.

Hmm...that was not my experience. Using the patch to b4 that you sent me:

```
 b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/b4/__init__.py b/b4/__init__.py
index b974642..993d6f6 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -3259,7 +3259,7 @@ def get_smtp(dryrun: bool = False) ->
Tuple[Union[smtplib.SMTP, smtplib.SMTP_SSL
         else:
             envpair = email.utils.parseaddr(fromaddr)
         if envpair[1]:
-            smtp += ['-f', envpair[1]]
+            smtp += ['-t']
         return smtp, fromaddr

     encryption = sconfig.get('smtpencryption')
```

Here was the recent result:
https://lore.kernel.org/llvm/[email protected]/
(Note to followers, the very first line has:

From: Nick Desaulniers <[email protected]>

compare that with v1:
https://lore.kernel.org/all/[email protected]/

From: [email protected]

This is a PITA because now patches are getting merged without my name on them.
example: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=79e8328e5acbe691bbde029a52c89d70dcbc22f3

author [email protected] <[email protected]>

Konstantine, can you please help?

In particular, I would love if you could address the question about using -t rather than -f <email addr>, or provide concrete feedback to Sterling (cc'ed) on what the expected behavior of the external mailer is, such that Sterling can then provide feedback on whether that's acceptable or not.

--
Thanks,
~Nick Desaulniers

#11 lore raw
Quoted 18 lines · Nick Desaulniers
Quoted 16 lines · Justin Stitt
Quoted 14 lines · Nick Desaulniers
Quoted 10 lines · Konstantin Ryabitsev
Quoted 4 lines · Kees Cook

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

I'm pretty sure this is the side-effect of using sendgmr, which forces the in-header From: to match what was passed in the -f parameter. It's just another way in which it differs from /bin/sendmail.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Going back and forth between the maintainer of sendgmr here...

I don't think you ever responded to my question of -t:
https://bugzilla.kernel.org/show_bug.cgi?id=217332#c9

FWIW, I tried manually adding -t from inside of b4 and it did _not_ fix the issue. sendgmr still botched the From: header.

Hmm...that was not my experience. Using the patch to b4 that you sent me:

Sorry, I meant adding the -t flag in conjunction with the existing -f flag did _not_ work. The standalone -t
flag certainly works as you've aptly demonstrated. Thanks for confirming.

To elaborate:

Works!
Sending via "/usr/bin/sendgmr -i -t"

Doesn't Work!
Sending via "/usr/bin/sendgmr -i -t -f [email protected]"

Doesn't Work Either!
Sending via "/usr/bin/sendgmr -i -t -f Justin Stitt [email protected]"

Quoted 49 lines

```

 b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
b4/__init__.py +0 -0
index b974642..993d6f6 100644
@@ -3259,7 +3259,7 @@ def get_smtp(dryrun: bool = False) ->

Tuple[Union[smtplib.SMTP, smtplib.SMTP_SSL
else:
envpair = email.utils.parseaddr(fromaddr)
if envpair[1]:

b4/__init__.py +1 -1
-            smtp += ['-f', envpair[1]]
+            smtp += ['-t']
         return smtp, fromaddr
 
     encryption = sconfig.get('smtpencryption')

```

Here was the recent result:
https://lore.kernel.org/llvm/[email protected]/
(Note to followers, the very first line has:

From: Nick Desaulniers <[email protected]>

compare that with v1:
https://lore.kernel.org/all/[email protected]/

From: [email protected]

This is a PITA because now patches are getting merged without my name on them.
example: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=79e8328e5acbe691bbde029a52c89d70dcbc22f3

author [email protected] <[email protected]>

Konstantine, can you please help?

In particular, I would love if you could address the question about using -t rather than -f <email addr>, or provide concrete feedback to Sterling (cc'ed) on what the expected behavior of the external mailer is, such that Sterling can then provide feedback on whether that's acceptable or not.

--
Thanks,
~Nick Desaulniers

#12 lore raw
In reply to Nick Desaulniers
Quoted 5 lines · Nick Desaulniers

In particular, I would love if you could address the question about using -t rather than -f <email addr>, or provide concrete feedback to Sterling (cc'ed) on what the expected behavior of the external mailer is, such that Sterling can then provide feedback on whether that's acceptable or not.

Reading the sendmail man page
(https://man7.org/linux/man-pages/man8/sendmail.8.html), I think the proper way to do it is to:

if sendemail.from has just the email address, like:

[sendemail]
from = [email protected]
smtpserver = /some/path/sendmail-alike

We should run this command:

/some/path/sendmail-alike -i -f [email protected]

If we encounter the following (without envelopesender):

[sendemail]
from = Foo Quux <[email protected]>
smtpserver = /some/path/sendmail-alike

Then we should use the -F switch to pass the full name:

/some/path/sendmail-alike -i -F "Foo Quux" -f [email protected]

I'm not convinced that passing the following will work properly on all /bin/sendmail implementations:

/some/path/sendmail-alike -i -f "Foo Quux <[email protected]>"

I am fairly certain that at least some clients will not properly handle such situations, because I think -f is only supposed to have the email address, not the full From-like header.

Now, the question is -- does sendgmr support the -F flag?

-K

#13 lore raw
Quoted 35 lines · Konstantin Ryabitsev
Quoted 5 lines · Nick Desaulniers

In particular, I would love if you could address the question about using -t rather than -f <email addr>, or provide concrete feedback to Sterling (cc'ed) on what the expected behavior of the external mailer is, such that Sterling can then provide feedback on whether that's acceptable or not.

Reading the sendmail man page
(https://man7.org/linux/man-pages/man8/sendmail.8.html), I think the proper way to do it is to:

if sendemail.from has just the email address, like:

[sendemail]
from = [email protected]
smtpserver = /some/path/sendmail-alike

We should run this command:

/some/path/sendmail-alike -i -f [email protected]

If we encounter the following (without envelopesender):

[sendemail]
from = Foo Quux <[email protected]>
smtpserver = /some/path/sendmail-alike

Then we should use the -F switch to pass the full name:

/some/path/sendmail-alike -i -F "Foo Quux" -f [email protected]

I'm not convinced that passing the following will work properly on all /bin/sendmail implementations:

Quoted 7 lines

/some/path/sendmail-alike -i -f "Foo Quux <[email protected]>"

I am fairly certain that at least some clients will not properly handle such situations, because I think -f is only supposed to have the email address, not the full From-like header.

Now, the question is -- does sendgmr support the -F flag?

It does not currently, but we probably could add support for it.

What are your thoughts Konstantin on -t?

Signature · 2 lines
Thanks,
~Nick Desaulniers
#14 lore raw
Quoted 7 lines · Nick Desaulniers
Quoted 5 lines

I am fairly certain that at least some clients will not properly handle such situations, because I think -f is only supposed to have the email address, not the full From-like header.

Now, the question is -- does sendgmr support the -F flag?

It does not currently, but we probably could add support for it.

Per our IRC discussion, I think we stumbled on the solution that works for your case and makes b4 more compatible with git-send-email. Specifically, we only pass the -f switch if envelopesender is set.

Quoted 1 line

What are your thoughts Konstantin on -t?

I don't really see the point of it, as we already pass the list of recipients as part of the command line invocation. The -t switch is just a convenience flag for humans.

-K

#15 lore raw
Quoted 6 lines · Konstantin Ryabitsev
Quoted 4 lines · Nick Desaulniers
Quoted 4 lines

I am fairly certain that at least some clients will not properly handle such situations, because I think -f is only supposed to have the email address, not the full From-like header.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Now, the question is -- does sendgmr support the -F flag?

It does not currently, but we probably could add support for it.

Per our IRC discussion, I think we stumbled on the solution that works for your case and makes b4 more compatible with git-send-email. Specifically, we only pass the -f switch if envelopesender is set.

Yep, thanks for
https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=8382882b9fb6c50737b6e19198a259850527d2a6
that seems to do it for us. Please let us know if that gets reverted and when that ships in a formal release.

We can probably close out
https://bugzilla.kernel.org/show_bug.cgi?id=217332 (I was not able to do so).

Quoted 6 lines
Quoted 2 lines

What are your thoughts Konstantin on -t?

I don't really see the point of it, as we already pass the list of recipients as part of the command line invocation. The -t switch is just a convenience flag for humans.

Hmm...given the above fix I guess it's kind of moot.

Thanks again for the fix. Now I can start formally recommending the usage of b4 more internally/to my colleagues.

I also look forward to b4 prep --check for running checkpatch on my series!

Signature · 2 lines
Thanks,
~Nick Desaulniers
#16 lore raw
In reply to Konstantin Ryabitsev
Quoted 32 lines · Konstantin Ryabitsev
Quoted 5 lines · Nick Desaulniers

In particular, I would love if you could address the question about using -t rather than -f <email addr>, or provide concrete feedback to Sterling (cc'ed) on what the expected behavior of the external mailer is, such that Sterling can then provide feedback on whether that's acceptable or not.

Reading the sendmail man page
(https://man7.org/linux/man-pages/man8/sendmail.8.html), I think the proper way to do it is to:

if sendemail.from has just the email address, like:

[sendemail]
from = [email protected]
smtpserver = /some/path/sendmail-alike

We should run this command:

/some/path/sendmail-alike -i -f [email protected]

If we encounter the following (without envelopesender):

[sendemail]
from = Foo Quux <[email protected]>
smtpserver = /some/path/sendmail-alike

Then we should use the -F switch to pass the full name:

/some/path/sendmail-alike -i -F "Foo Quux" -f [email protected]

Quoted 8 lines

I'm not convinced that passing the following will work properly on all /bin/sendmail implementations:

/some/path/sendmail-alike -i -f "Foo Quux <[email protected]>"

I am fairly certain that at least some clients will not properly handle such situations, because I think -f is only supposed to have the email address, not the full From-like header.

Working on a patch to address all of these points.

Quoted 4 lines

Now, the question is -- does sendgmr support the -F flag?

-K

#17 lore raw
In reply to Kees Cook
Quoted 23 lines · Kees Cook
Quoted 21 lines · Nick Desaulniers
Quoted 20 lines · Kees Cook
Quoted 8 lines · Justin Stitt

When using b4 send there seems to be an issue with the real name not being included in the From: header.

Here's an example:
| From: [email protected]

Whereas, something like the following is preferred:
| From: Justin Stitt <[email protected]>

Hmm. There are actually two "From" fields. There's envelope sender "From" (which is what -f sets), and the in-body "From:" field. I wonder if b4 isn't constructing the in-body From: field, and when missing, the MUAs add it based on the -f flag?

Quoted 6 lines

This patch fixes this issue and achieves the preferred behavior (above) by properly using both parts of a user's from field from their config.

A .gitconfig like this now properly works
| [sendemail]
| from = Justin Stitt <[email protected]>

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

Perhaps what's needed is this (which is what I've been using forever):

[sendemail]
envelopesender = auto

Sending via "/usr/bin/sendgmr -i -f auto"
[PATCH] word-at-a-time: use the same return type for has_zero
regardless of endianness
CRITICAL: Error running /usr/bin/sendgmr -i -f auto: F0801
15:18:46.325579 1 sendgmr.go:277] Send failed: sending email
failed (permanent failure): PERM_FAILURE: PERM_FAIL_SENDER_DENIED With GMR service:selector "_flex_", the envelope from address can only be {LDAP}[email protected].

Quoted 4 lines
Quoted 2 lines

Thanks for the tip; I'll give that a shot. Do you have from set under [sendemail] as well or no?

I don't, no. I also don't use "b4 send" (just "git send-email"), so it's

Well, we're trying to get that working with sendgmr + b4, not postfix
+ git send email.

Quoted 19 lines

not clear to me what's actually going wrong here. It still looks to me like either "b4 send" isn't writing a "From:" header, or Justin (and your?) MUA is removing/replacing it when it processes the "-f" argument.

FWIW, my MUA is postfix. (Though actually, I guess, it's the MTA, b4 or git is the MUA... whatever. The thing I hand off to is postfix.)

For the relevant ~/.gitconfig settings, I have:

[user]
email = [email protected]
name = Kees Cook
[sendemail]
envelopesender = auto
confirm = auto

--
Kees Cook

Signature · 2 lines
Thanks,
~Nick Desaulniers