Skip to contentSkip to conversation

Patches sent to mailing lists: "From" attribute modified

OE-core Michael Opdenacker 4 participants 6 messages Mar 17, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 16 lines · Michael Opdenacker via lists.openembedded.org

Greetings,

My patches sent to the mailing lists are causing trouble for Richard.

The reason is the "From" field is modified by the mailing list server. It's
From: "Michael Opdenacker via lists.yoctoproject.org" <[email protected]>
instead of
From : Michael Opdenacker <[email protected]"
in my original patch.

And then when you try to apply the patch with "git am", you get a modified committer name. This makes it harder for Richard to apply patches, otherwise you get commits such as:
https://git.yoctoproject.org/poky/log/?qt=author&q=via

Quoted 7 lines

If I understood correctly, the problem happens because we had to enable DMARC on our domain (bootlin.com), because of a storm of spam messages claiming to come from our domain. Otherwise our legitimate e-mails were getting blocked by Google Mail.

Richard recalls that someone once found a workaround for this issue. Did any of you ever face this?

The problem seems to originate from the behavior of "git am"... As its manual says (https://git-scm.com/docs/git-am):

"The commit author name is taken from the "From: " line of the message"

... and there seems to be no way to override this behavior.

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Hi Michael,

Quoted 27 lines · Michael Opdenacker via lists.openembedded.org
Quoted 16 lines · Michael Opdenacker via lists.openembedded.org

Greetings,

My patches sent to the mailing lists are causing trouble for Richard.

The reason is the "From" field is modified by the mailing list server. It's
From: "Michael Opdenacker via lists.yoctoproject.org" <[email protected]>
instead of
From : Michael Opdenacker <[email protected]"
in my original patch.

And then when you try to apply the patch with "git am", you get a modified committer name. This makes it harder for Richard to apply patches, otherwise you get commits such as:
https://urldefense.proofpoint.com/v2/url?u=https-3A__git.yoctoproject.org_poky_log_-3Fqt-3Dauthor-26q-3Dvia&d=DwICaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AI6b75ihH3xBTnGsJf1p6Fk4ycTpByxqngp1ZhojT9rZ1xuLEsKCg2huL2l9DoRV&s=BWM5kPiChvtcTWQASNpxXSwDK1hcT3MEW1rhDPfcNtM&e=

Quoted 7 lines

If I understood correctly, the problem happens because we had to enable DMARC on our domain (bootlin.com), because of a storm of spam messages claiming to come from our domain. Otherwise our legitimate e-mails were getting blocked by Google Mail.

Richard recalls that someone once found a workaround for this issue. Did any of you ever face this?

Quoted 7 lines

The problem seems to originate from the behavior of "git am"... As its
manual says (https://urldefense.proofpoint.com/v2/url?u=https-3A__git-2Dscm.com_docs_git-2Dam&d=DwICaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AI6b75ihH3xBTnGsJf1p6Fk4ycTpByxqngp1ZhojT9rZ1xuLEsKCg2huL2l9DoRV&s=hTmUlxaJ49ljTkpvEGIJbGeKpfayoSbuOdB_mOttSnU&e= ):

"The commit author name is taken from the "From: " line of the message"

... and there seems to be no way to override this behavior.

Maybe there's something you can do to configure git send-email to add your

From: Michael Opdenacker <[email protected]"

at the top of the mail. See my patches on the ML to see what I mean exactly but that should make it nicer to maintainers because this From will be used and not the one from the mailbox's from field.

FWIW, I did nothing in the configuration of git to have this, it's just that it probably detects that the sendemail.from config is different from the commit author mail address and adds it.

Cheers,
Quentin

#6 lore raw
In reply to Michael Opdenacker
Quoted 25 lines · Michael Opdenacker via lists.openembedded.org
Quoted 16 lines · Michael Opdenacker via lists.openembedded.org

Greetings,

My patches sent to the mailing lists are causing trouble for Richard.

The reason is the "From" field is modified by the mailing list server. It's
From: "Michael Opdenacker via lists.yoctoproject.org" <[email protected]>
instead of
From : Michael Opdenacker <[email protected]"
in my original patch.

And then when you try to apply the patch with "git am", you get a modified committer name. This makes it harder for Richard to apply patches, otherwise you get commits such as:
https://git.yoctoproject.org/poky/log/?qt=author&q=via

Quoted 7 lines

If I understood correctly, the problem happens because we had to enable DMARC on our domain (bootlin.com), because of a storm of spam messages claiming to come from our domain. Otherwise our legitimate e-mails were getting blocked by Google Mail.

Richard recalls that someone once found a workaround for this issue. Did any of you ever face this?

Quoted 6 lines

The problem seems to originate from the behavior of "git am"... As its manual says (https://git-scm.com/docs/git-am):

"The commit author name is taken from the "From: " line of the message"

... and there seems to be no way to override this behavior.

 Patchwork solves this issue by re-rewriting the From header. Cfr. [1] - if you look at the headers, it has

From: Christian Stewart via buildroot <[email protected]>

but if you open the mbox version (which is what you get with pwclient git-am), you get

X-Patchwork-Original-From: Christian Stewart via buildroot
<[email protected]>
From: Christian Stewart <[email protected]>

If you want to reproduce that outside of patchwork, you can look at its sources.

 Regards,
 Arnout

[1] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

(I would have taken a patch from someone at bootlin, but the accents are annoying :-)

#3 lore raw
In reply to Quentin Schulz

Hi Quentin,

Quoted 6 lines · Quentin Schulz

Maybe there's something you can do to configure git send-email to add your

From: Michael Opdenacker <[email protected]"

Quoted 7 lines

at the top of the mail. See my patches on the ML to see what I mean exactly but that should make it nicer to maintainers because this From will be used and not the one from the mailbox's from field.

FWIW, I did nothing in the configuration of git to have this, it's just that it probably detects that the sendemail.from config is different from the commit author mail address and adds it.

Thanks for the tip. It could work, as my early tests show a difference in the received e-mails.

I'll be able to test soon.
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw
Quoted 13 lines · Michael Opdenacker via lists.openembedded.org

Hi Quentin,

Quoted 10 lines · Quentin Schulz

Maybe there's something you can do to configure git send-email to add your

From: Michael Opdenacker <[email protected]"

at the top of the mail. See my patches on the ML to see what I mean exactly but that should make it nicer to maintainers because this From will be used and not the one from the mailbox's from field.

Quoted 8 lines
Quoted 3 lines

FWIW, I did nothing in the configuration of git to have this, it's just that it probably detects that the sendemail.from config is different from the commit author mail address and adds it.

Thanks for the tip. It could work, as my early tests show a difference in the received e-mails.

I couldn't convince git to do it since it thinks the sender matches the author.

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw
Quoted 17 lines · Alexandre Belloni via lists.openembedded.org
Quoted 16 lines · Michael Opdenacker via lists.openembedded.org

Hi Quentin,

Quoted 12 lines · Quentin Schulz

Maybe there's something you can do to configure git send-email to add your

From: Michael Opdenacker <[email protected]"

at the top of the mail. See my patches on the ML to see what I mean exactly but that should make it nicer to maintainers because this From will be used and not the one from the mailbox's from field.

FWIW, I did nothing in the configuration of git to have this, it's just that it probably detects that the sendemail.from config is different from the commit author mail address and adds it.

Quoted 5 lines
Quoted 3 lines

Thanks for the tip. It could work, as my early tests show a difference in the received e-mails.

I couldn't convince git to do it since it thinks the sender matches the author.

Yoohoo, it worked in my case, through this message I've just sent:
https://lore.kernel.org/yocto-docs/[email protected]/T/#u

All I had to do was add this line to my ~/.gitconfig file (in the [sendemail] section):
        from = [email protected]

Now, there is an explicity "From" field in the body of the e-mail received through the mailing list.

Compare with
https://lore.kernel.org/yocto-docs/[email protected]/T/#u,
in which there was just the "Signed-off-by" information.

Many thanks, Quentin!
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com