[neomutt-users] Blacklisting threads

Ian Zimmerman itz at very.loosely.org
Wed Jul 3 20:28:51 CEST 2019

On 2019-07-03 13:24, Florian Bruhin wrote:

> Ideally, I'd have some keystroke which adds a filter somewhere (based
> on Subject or In-Reply-To) to ignore all those messages.
> Is there anything like that somewhere already? If not, how would I
> best implement such a thing? Something like a script which ssh's to
> the mail server and adjusts the maildrop config?

I do the following:

# .muttrc
macro index,pager <f9>f "<pipe-message>score-mutt-followups<enter>" "autoscore"
source "mutt-cond-source ~/.local/var/mutt-scores"|

# score-mutt-followups
# I tried a number of ways to make this fully automatic,
# but the problem is not well defined enough for that.
    formail -czx 'message-id:' | tr -d '[:blank:]<>'

today=$(date +'%Y-%m-%d' )
get_string $(isolate_msgid)

case $pattern in
        printf "score '=x \"%s\"' 1 # %s\n" $pattern $today \
            >> $(conc $HOME /.local/var/mutt-scores)
        exit 0

get_string is defined in a shell library to show its argument in an
editor, and spit it back out to $__ (maybe modified) when the editor
exits.  This semi-manual step is necessary (for me) because of the many
wild characters in Message-IDs which would otherwise confuse mutt
without many levels of escaping/quoting.

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.

More information about the neomutt-users mailing list