Discussion:
Exceptions to ~p based on From:?
John Hawkinson
2018-09-22 22:49:02 UTC
Permalink
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" <***@nytimes.com>
To: ***@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" <***@nytimes.com>
To: user-***@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.

--***@mit.edu
John Hawkinson
Mihai Lazarescu
2018-09-23 09:50:01 UTC
Permalink
Post by John Hawkinson
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
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
Subject: Today's Headlines: Rod Rosenstein Suggested Secretly Recording Trump
If non-mutt solutions are acceptable, I'd change
***@domain.name to user-***@domain.name in some procmail
rule(s).

Mihai
John Hawkinson
2018-09-23 11:44:38 UTC
Permalink
Thanks, Mihai. I'm loathe to reject all non-mutt solutions, but I don't have a practical way to run procmail (or anything else) before messages are delivered to the IMAP server. So no that doesn't work for me.

(I think, also, that I'd not be really comfortable with the idea of modifying the headers[*] that come on a message. Adding headers seems fine, but modifying the existing ones seems like a line that shouldn't be crossed. In a world where we have DKIM, it seems an especially bad idea, although I don't know if DKIM tends to include the To: header in its crypto hashes).

--***@mit.edu
John Hawkinson

[*] I will say I've given serious thought to modifying the Date: field for messages that express the date in UTC that are sent by people who are in substantially on-UTC timezones, like US/Eastern, so I can't say I'm as much of an absolutist on this point as my words might suggest....
Mihai Lazarescu
2018-09-23 13:03:13 UTC
Permalink
(In a world where we have DKIM, it seems an especially bad
header in its crypto hashes).
DKIM appears to not include such headers (but no personal
experience here): «DKIM attaches a new domain name identifier
to a message and uses cryptographic techniques to validate
authorization for its presence. The identifier is independent
of any other identifier in the message, such in the author's
From: field.» http://www.dkim.org/

Mutt-wise, would it be doable to set user-defined variables to
specific patterns (e.g., my_f1=~p!~f…) and expand them to
limit the view (i.e., use variables as shortcuts for complex
match patterns)? This is a question since I am not so
mutt-proficient as I'd wish to be… :-)

Mihai
Ian Zimmerman
2018-09-24 01:04:47 UTC
Permalink
Post by John Hawkinson
I'd like messages to those lists excluded from ~p.
Isn't this a job for the scoring subsystem of mutt?
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
Continue reading on narkive:
Loading...