On 31Dec2014 17:09, Eliana <[email protected]> wrote:
On Thu, Jan 01, 2015 at 09:16:43AM +1100, Cameron Simpson wrote:
On 16Dec2014 15:23, Patrick asked me to provide a recipe for unmangling the
"From:" headers of posts to list like [email protected] which
rewrite the "From:" headers of their posts to honour the rules of DMARC
authentication.
....
 From: "Cameron Simpson [email protected] [sed-users]" <[email protected]>
I now automatically reverse that on receipt.
.... the sed script to do the same thing on suitable messages:
 https://bitbucket.org/cameron_simpson/css/src/tip/bin/fix-dkim-from

Thanks so much.   This looks really, really cool. I cannot take the time to do 
any testing now, but I want to comment that I think there may be a way to 
generalize your great work to all servers, with one sed script and one 
procmailrc recipe.  I may be wrong, but I think it is worth looking at the fact 
(at least it appears this way to me) that all lists using DKIM signatures tend 
to say that they have done that in their headers.

Yes, we may hope. It looks like Yahoo have gone to some effort to keep the relevant information available. But sed-users is the only example list I have to which I am subscribed.

It may also depend on the mail server itself, what I see in some messages at 
gmail is:

X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;

But in others, from a different mailing list server, the line just starts with

DKIM-Signature.

Yahoo groups is one place, but the same mangling happens with many other 
mailing list servers.

Can you provide some example headers from other lists?

BTW, the sed script is deliberately portable i.e. _not_ GNU sed - basic regexps only etc. But it could be generalised with more examples.

Finally, the matching procmailrc recipe (untested) to use in your own
procmail recipes:

 :0whf
 * from:.*<[email protected]>
 | fix-dkim-from

I see you said the above is untested, but I am thinking: Why can't the above be 
as follows, so all yahoogroups lists would qualify for the recipe?

:0whf
* from:.*<.*@yahoogroups.com>
| fix-dkim-from

That would probably be safe. I was more making the point that the script itself presumes it is being given a mangled header; you need to ensure that it is only applied to relevant mailing lists.

Certainly if I were on several such lists I would be doing what you suggest: one procmail recipe matching several lists.

Cheers,
Cameron Simpson <[email protected]>

In theory, there is no difference between theory and practice.
In practice, there is. - Yogi Berra

Reply via email to