Re: filtering headers from forwarded messages

Subject: Re: filtering headers from forwarded messages

Date: Sun, 03 Jan 2021 12:35:48 -0500

To: Teemu Likonen, Notmuch Mail

Cc:

From: Daniel Kahn Gillmor


On Sun 2021-01-03 09:48:56 +0200, Teemu Likonen wrote:
> But yes, it would be nice to filter headers like "Received", maybe
> "DKIM-Signature" and various unofficial headers starting with "X-".

Right, my current value of message-forward-ignored-headers is:

    ("^Content-Transfer-Encoding:" "^X-Gnus:" "^Received:"
     "^Return-Path:" "^X-Original-To:" "^Delivered-To:"
     "^X-Virus-Check-By:" "^Received-SPF:")

(i don't care to strip out DKIM-Signature headers because i see that as
part of the initial message injection into the SMTP system)

> For a quick first step I would probably try running "C-u M-|"
> (shell-command-on-region) in Emacs and pipe the forwarded message
> through command like this:
>
>     formail -I Received -I DKIM-Signature -I X-Whatever
>
> Probably after that I would integrate that shell command call in one
> Emacs command and then implement the functionality in Emacs Lisp. But so
> far I haven't cared enough.

This all sounds like it would work, but it seems like a lot of trouble
compared to fixing a regression.  this filtering worked just fine for
me before i upgraded to emacs 27.1.

I've filed a report about the regression with emacs upstream:
https://debbugs.gnu.org/45631

Thanks for helping me think through the details, Teemu.

   --dkg
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: