LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Filtering mail using mutt's score and limit commands.

[ILUG] Filtering mail using mutt's score and limit commands.

Kevin O'Riordan kor at compsoc.com
Tue Oct 19 13:50:00 IST 2004


Hi all,

Mutt's scoring and limiting abilities can be used to change your view of
a mailbox.  It could be used as a sort of "killfile-lite".

Something like this could be done using procmail instead, but this'll do
me for the moment anyway.

Example muttrc lines:

    # Remove all scoring rules when entering any other mailbox.
    folder-hook     .       'unscore  *'

    # Assign a default score (5) to all messages.
    folder-hook     ilug    'score  "~A"                        +5'

    # Drop 1 point if subject includes the word 'spam'
    folder-hook     ilug    'score  "~s spam"                   -1'

    # Drop 2 points if mail was sent by someone.
    folder-hook     ilug    'score  "~f someone at somewhere.com"  -2'

    # Add 3 if mail was addressed to me.  ~C may be a better match.
    folder-hook     ilug    'score  "~p"                        +3'
    
    # Limit my view of the mailbox to messages that scored 5 or higher.
    folder-hook     ilug    'push  "l ~n 5-\n"'

While running mutt, if I wanted to view the mails that scored below 5 I
could type:

    l ~n -4

or

    l ~n 0-

to view all messages (0 is the lowest score mutt allows).

So if a thread doesn't make sense, due to the absence of some mail
you've filtered out, you can change your threshold.


There's a few muttrc options, such as 'hide_limited' and
'hide_top_limited', and some other patterns, such as ~Q, that might also
be of use; these sections of the mutt manual should be useful:

    http://www.mutt.org/doc/manual/manual-3.html#ss3.22
    http://www.mutt.org/doc/manual/manual.html#toc4

hth,
-KOR.


-- 
shoot can I can I fascists shoot if rabbits,



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell