Exceptions to ~p based on From:?

John Hawkinson jhawk at MIT.EDU
Sat Sep 22 22:49:02 UTC 2018


Hi, mutt-users:

    I sent a work-in-progress patch to mutt-dev about this, but Kevin asked me to take it up here first. I'm a big user of limiting my index to only personal messages (limit to "%p", or MUTT_PERSONAL_RECIP in the source). See http://lists.mutt.org/pipermail/mutt-dev/Week-of-Mon-20180917/000232.html

    Although this used to work pretty well, more and more the modern mailing list paradigm (e.g. Mailchimp lists, etc.) is to have bulk or list messages that are indistinguishable from personal mail, e.g.:

  From: "NYTimes.com" <nytdirect at nytimes.com>
  To: user at domain.name
  Subject: Today's Headlines: Rod Rosenstein Suggested Secretly Recording Trump

and of course this shows up in ~p, which is not desirable.

    Most of the time, I can get around this by changing the subscription address to someting else, e.g.:

  From: "NYTimes.com" <nytdirect at nytimes.com>
  To: user-junk at domain.name
  Subject: Today's Headlines: Rod Rosenstein Suggested Secretly Recording Trump


    However, there are some lists where that is impractical, and the only way to clearly identify them is with the From: line.


    I'd like messages to those lists excluded from ~p. My patch, which I know is clearly wrong, searches the From: of each message against the "unalternates" exclusion list, and so I can exclude the relevant list from the pattern, and ~p works. But this is a misuse of "unalternates," which is supposed to be used to match against recipient fields (To:, Cc:).

    Does anyone have suggestions or workflows for accomplishing this?

    Kevin points out I could shift gears and adjust what I limit to, such as putting the problematic senders in an address group and limiting to "~p !%f mylists". 

    That...sort of works, but also is really impractical for me, becuse I often type limiting patterns and going from 2 keystrokes to 10 (or 8, if it was one-letter group) is not pleasant. And although I could use a macro, I also regularly use ~p in more complicated patterns, so a macro would only help with the simplest of them that are easily repeatable.

    How do others approach this problem?

    Does anyone else think that mutt should have a better solution, like a way to exclude messages from ~p based on their From: field? If so what would that llok like, and how should it interact with lists and subscribedlists, if at all?

    Thanks.

--jhawk at mit.edu
  John Hawkinson


More information about the Mutt-users mailing list