is it possible to auto-detect mailing list?
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 l...@address.org' in .muttrc), such that there is a 'L' flag showing up in the index? Yubin
Re: is it possible to auto-detect mailing list?
On 20Apr2018 22:46, Yubin Ruan wrote: 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 l...@address.org' in .muttrc), such 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
Re: is it possible to auto-detect mailing list?
On Fri, Apr 20, 2018 at 10:46:17PM +0800, Yubin Ruan wrote: > 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 l...@address.org' in .muttrc), such > 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. signature.asc Description: Digital signature
Re: is it possible to auto-detect mailing list?
On Fri, Apr 20, 2018 at 10:46:17PM +0800, Yubin Ruan wrote: > 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 l...@address.org' in .muttrc), such > 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
Re: is it possible to auto-detect mailing list?
* Tom Furie [04-20-18 18:54]: > On Fri, Apr 20, 2018 at 10:46:17PM +0800, Yubin Ruan wrote: > > > 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 l...@address.org' in .muttrc), > > such > > 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 will do it. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri Registered Linux User #207535@ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode