Early blind copy for libc-alpha
Christopher Faylor
cgf-use-the-mailinglist-please@sourceware.org
Wed Apr 29 16:25:22 GMT 2020
On Wed, Apr 29, 2020 at 04:28:14PM +0200, Florian Weimer wrote:
>* Christopher Faylor:
>> On Wed, Apr 29, 2020 at 11:23:05AM +0200, Florian Weimer wrote:
>>>Would it be possible to get an early copy of messages sent to
>>><libc-alpha@sourceware.org> before they go into Mailman?
>>>
>>>It will help those of us who apply patches on other people's behalf,
>>>without having to undo the Mailman mangling first.
>>
>> What specifically is mailman doing to the email you receive?
>
>The From: header contains the list address, not the patch author,
>so feeding the message into “git am” produces an incorrect commit.
I just did a google search for "git am" "dmarc" and see that this pain
point has been around since DMARC started becoming popular. I didn't
see any solution. It was interesting to see people like John Levine and
Theorore T'so weighing in on the issue though.
Attached is a simple script which will rewrite the headers so that From:
is no longer munged. I assume that this could be used as a front-end
for "git am". This relies on the fact that we have mailman set up to
Cc: the original email sender when the address is munged.
I'm providing this as-is after 15 minutes of work. There are probably
more elegant ways to accomplish the same task but at least the script is
short.
-------------- next part --------------
#!/bin/sh
t=/tmp/$$.eml
cat > $t
# e.g., From: Christopher Faylor via Test-list <test-list@sourceware.org>
from=$(sed -nre 's/^From: (.*) via .* <.*$/\1/p' $t)
# e.g., Cc: Christopher Faylor <me.test-list@cgf.cx>
cc=$(sed -nre "s/^Cc: ($from "'<.*>).*$/\1/ip' $t)
exec < $t
rm $t
exec sed -e "s/^From:.*/From: $cc/" -e "/[Cc][cC]: $cc.*/d"
More information about the Libc-alpha
mailing list