Discussion:
is it possible to auto-detect mailing list?
Yubin Ruan
2018-04-20 14:46:17 UTC
Permalink
Most mailing lists emails have several sepecial headers, for example,
"Mailing-List" and "X-Mailing-List". Is it possible to mark those emails as
subscribed (as if we have used `subscribe ***@address.org' in .muttrc), such
that there is a 'L' flag showing up in the index?

Yubin
Cameron Simpson
2018-04-20 22:43:18 UTC
Permalink
Post by Yubin Ruan
Most mailing lists emails have several sepecial headers, for example,
"Mailing-List" and "X-Mailing-List". Is it possible to mark those emails as
that there is a 'L' flag showing up in the index?
If you fetch mail through a mail filing program such as procmail you could
recognise these as they come in and add new lists to your muttrc as they are
seen.

Cheers,
Cameron Simpson <***@cskk.id.au>
Tom Furie
2018-04-20 22:43:49 UTC
Permalink
Post by Yubin Ruan
Most mailing lists emails have several sepecial headers, for example,
"Mailing-List" and "X-Mailing-List". Is it possible to mark those emails as
that there is a 'L' flag showing up in the index?
I'd say it seems possible. My immediate first thoughts (without much
effort) would be to search for the relevant headers. If found, check
against a "subscribed" file. If the mailing list doesn't already have
an entry, add it.

Perhaps procmail and sed would be useful for the purpose.

The subscription file could be sourced by .muttrc. Of course, changes
won't be reflected until mutt is restarted.

Cheers,
Tom
--
Employees and their families are not eligible.
Patrick Shanahan
2018-04-20 23:17:22 UTC
Permalink
Post by Tom Furie
Post by Yubin Ruan
Most mailing lists emails have several sepecial headers, for example,
"Mailing-List" and "X-Mailing-List". Is it possible to mark those emails as
that there is a 'L' flag showing up in the index?
I'd say it seems possible. My immediate first thoughts (without much
effort) would be to search for the relevant headers. If found, check
against a "subscribed" file. If the mailing list doesn't already have
an entry, add it.
Perhaps procmail and sed would be useful for the purpose.
The subscription file could be sourced by .muttrc. Of course, changes
won't be reflected until mutt is restarted.
no, simply, :source <file>
will do it.
--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Registered Linux User #207535 @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode
Tom Furie
2018-04-21 14:47:40 UTC
Permalink
Post by Tom Furie
The subscription file could be sourced by .muttrc. Of course, changes
won't be reflected until mutt is restarted.
no, simply, :source <file> will do it.
Okay, thank you. Of course that's also an option :)

Cheers,
Tom
--
Madness has no purpose. Or reason. But it may have a goal.
-- Spock, "The Alternative Factor", stardate 3088.7
Francesco Ariis
2018-04-20 22:56:05 UTC
Permalink
Post by Yubin Ruan
Most mailing lists emails have several sepecial headers, for example,
"Mailing-List" and "X-Mailing-List". Is it possible to mark those emails as
that there is a 'L' flag showing up in the index?
Hello Yubin,
not a real answer unfortunately, but I guess the main reason this has
not been implemented is because there are two commands in mutt,
`subscribe` and plain `lists`, and deciding which-is-which cannot be
done by simply checking the headers
-F
Continue reading on narkive:
Loading...