Re: scoring top posters
On 2015-09-20 09:06 +0200, Matthias Apitz wrote: > > ... so, no matter how "bad" a message is (let's say, a top post, a > > thread hijack, an ALL CAPS subject, and unlimited line length LOL), the > > worst it can score is 0. Am I right? I haven't used mutt scoring yet, > > so I am trying to learn how to best put it to my purposes. It seems > > to me that for flagging "badness" positive scores would be much more > > convenient. Am I missing something as usual? > > You missed, that you can score as well positive values and the rules are > summed up to a final score value, "rouded" to zero if at the end of the > day negative. See my score part of my ~/.muttrc (some mail addrs > overwritten with ). But you have to start with some arbitrary value as the default score (10 in your case) and you're still limited how low you can go before your negative scores are clipped (to use a photography term which seems oddly apt). What is the reason for this design decision in mutt, I wonder? Is it just the ambiguity when trying to parse score CONDITION -1 where -1 could be the negative score -1, or it could be an abbreviated range with upper bound +1. That could be easily fixed by changing the range separator, for example to "..". -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.
Re: scoring top posters
El día Saturday, September 19, 2015 a las 07:46:53PM -0700, Ian Zimmerman escribió: > Back to my bad habit of resurrecting old threads :) > > Do you really score "bad" messages with _negative_ scores? The manual > says (section 3.24): > > A message's final score is the sum total of all matching score > entries. However, you may optionally prefix value with an equal sign > (“=”) to cause evaluation to stop at a particular entry if there is a > match. Negative final scores are rounded up to 0. > > ... so, no matter how "bad" a message is (let's say, a top post, a > thread hijack, an ALL CAPS subject, and unlimited line length LOL), the > worst it can score is 0. Am I right? I haven't used mutt scoring yet, > so I am trying to learn how to best put it to my purposes. It seems > to me that for flagging "badness" positive scores would be much more > convenient. Am I missing something as usual? You missed, that you can score as well positive values and the rules are summed up to a final score value, "rouded" to zero if at the end of the day negative. See my score part of my ~/.muttrc (some mail addrs overwritten with ). matthias ... # scoring: # # see http://www.mutt.org/doc/devel/manual.html#score-command # # the start was also loosely based on: http://www.strcat.de/dotfiles/mutt.scoring # # # Note: Scoring on a (X-)Header or Body won't work due to performance issue, only # information from the Index (like Subject: To: From: ,,,) can be scored. # this will show the score value (%4N) on the left of the Index # set index_format="%4N %4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" # set the threshold values # set score_threshold_delete=0# delete messages with score 0 set score_threshold_flag=50 # auto-flag messages w/ score >= 50 set score_threshold_read=5 # mark messages w/ score <= 5 as read # First remove all scorings # unscore * # Default - Scoring # score '~A'+10 # all messages start with score 10 score '~g|~G' +2 # PGP signed / encrypted messages score ~F +20 # flagged mails are important score ~D =0 # this is a deleted email score ~S =0 # superseded messages # The good ones # score '~t g...@unixarea.de' +20 # i'm quite important score '~f g...@unixarea.de' +20 # i'm quite important score '~s ubuntu-phone' +10 # score '~f webmas...@cubaliteraria.cu' +10 # Cuba Literaria score '~f epilob...@aol.com' +30 # needs +30 due to -30 for AOL # SPAM(er) # score '~f xxx...@gmail.com' -30 # score '~f x...@hiwaay.net' -30 # score '~f @aol.com' -30 # score '~f webmaster@*'-10 # Webmasters kidnapped by evil cult :> score '~s ^test$' - # all messages w/ subject "test" are killed score '~s sex | ~s adult' - # STFU score '~f anonymous' - # Yeah. Sure. Evil hackers score '~='- # all duplicates are killed score '~s ^unsubscribe$ !(~p|~P|~Q|~F)' - # all msgs w/ subject "unsubscribe" not by myself are killed score '~s "for sale"' - # sale yout compter. moron.. score '!~f@' - # no mail address present? score "~f '^([^ <>@]+ ){5,}'" - # a realname consisting of >=5 portions is invalid, too # threads I do not want anymore becaused I'm tired of the Subject: # score '~s "Gmirror/graid or hardware raid"' - score '~s "Questions about freebsd-update"' - score '~s "Microsoft Now OpenBSD Foundation"' - score '~s "Building TB from source code"' - score '~s "^Facebook$"' - score '~s "^Re: Facebook$"' - score '~s "How to change mouse cursor to standard hand cursor"' - score '~s "USB stick and some help with it"' - score '~s "interesting comment from a poster on phoronix"' - score '~s "HTTPS on freebsd.org, git, reproducible builds"' - ... -- Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ ☎ +49-176-38902045 No! Nein! ¡No! Όχι! -- Ευχαριστούμε!
Re: scoring top posters
On 2015-07-29 20:19 +0200, Matthias Apitz wrote: > I'm using scoring to mark, auto delete, ... certain mails I do not > want to read. I'd like to auto-score top posters for the next > mail. For the first mail it is not possible due to scoring is based on > header lines. But the sender could be scored with -10 or -20 for the > next mail... Back to my bad habit of resurrecting old threads :) Do you really score "bad" messages with _negative_ scores? The manual says (section 3.24): A message's final score is the sum total of all matching score entries. However, you may optionally prefix value with an equal sign (“=”) to cause evaluation to stop at a particular entry if there is a match. Negative final scores are rounded up to 0. ... so, no matter how "bad" a message is (let's say, a top post, a thread hijack, an ALL CAPS subject, and unlimited line length LOL), the worst it can score is 0. Am I right? I haven't used mutt scoring yet, so I am trying to learn how to best put it to my purposes. It seems to me that for flagging "badness" positive scores would be much more convenient. Am I missing something as usual? -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.
Re: scoring top posters
Hello, (I'm top posting here con intention to see how t-prot[1] will later react on this mail). I have installed it and it detects, for example, if the quoted lines exeeds the limit (default=30); but it does not detect, at least I could not figure out how, a normal top posting like this one here. Do I soemthing wrong? matthias El día Thursday, July 30, 2015 a las 11:09:03PM +0200, Dirk Griesbach escribió: Am Do, 30. Jul 2015 um 22:24:03 +0200 schrieb Heinz Diehl: First: you can't do that using procmail alone. A perl, python, ruby or whatever script will be needed. Simply pipe all incoming mail to your script via procmail. May I suggest t-prot[1] which works great as a display filter in mutt? It also allows to detect such things for scripting purposes. Dirk [1] http://www.escape.de/~tolot/mutt/ -- Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ ☎ +49-176-38902045 No! Nein! ¡No! Όχι! -- Ευχαριστούμε!
Re: scoring top posters
On 30.07.2015, Matthias Apitz wrote: A top posting we see, when in the body of the mail before a line like this: On 29 Jul 2015, Matthias Apitz wrote: are some other text lines. Of course we need here a good regular expression because the line 'On 29 Jul 2015, Matthias Apitz wrote:' is highly configurable and language dependent. First: you can't do that using procmail alone. A perl, python, ruby or whatever script will be needed. Simply pipe all incoming mail to your script via procmail. That said, I doubt such a script which *reliably* detects top-postings can be done. As a starting point for your language problem: simply check if the first line in the mail body ends with a colon (:).
Re: scoring top posters
On Thu Jul 30 22:24:03 2015, Heinz Diehl wrote: That said, I doubt such a script which *reliably* detects top-postings can be done. As a starting point for your language problem: simply check if the first line in the mail body ends with a colon (:). It’s not so simple. The first line of the previous mail doesn’t end with a colon and it wasn’t a top posting one. -- alarig signature.asc Description: Digital signature
Re: scoring top posters
El día Wednesday, July 29, 2015 a las 03:52:01PM -0400, Fred Smith escribió: On Wed, Jul 29, 2015 at 02:38:30PM -0500, David Champion wrote: Simplest idea I have is to add a procmail (or whatever) rule to detect top-posting, then insert a yes or no header into the message: X-Top-Posted: yes Then it's trivial to score it in mutt. and just to satisfy my curiosity, how would such a procmail rule look/work? A top posting we see, when in the body of the mail before a line like this: On 29 Jul 2015, Matthias Apitz wrote: are some other text lines. Of course we need here a good regular expression because the line 'On 29 Jul 2015, Matthias Apitz wrote:' is highly configurable and language dependent. matthias -- Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ ☎ +49-176-38902045 No! Nein! ¡No! Όχι! -- Ευχαριστούμε!
Re: scoring top posters
Hi Mattias - * On 30 Jul 2015, Matthias Apitz wrote: are some other text lines. Of course we need here a good regular expression because the line 'On 29 Jul 2015, Matthias Apitz wrote:' is highly configurable and language dependent. That's why I wouldn't do it with anything regular-expression-based, like mutt. Here's an example procmail rule which I haven't tested. toppostlines=`awk '/^/ {exit;} /^ *$/ {next;} /^[^ ]*:/ {next;} {total += 1;} END {print total}'` :0 f | formail -i X-Top-Post-Lines: $toppostlines This tells how many non-blank lines occur between the header and quoted text, without regard to what's in those lines. Two or three is probably not top-posty. You could go further and count unquoted lines AFTER the first quoted line. Then mutt can score on X-Top-Post-Lines. This doesn't help with any encoded mail -- you'd need a smarter filter for that. Smart decoding and inability to run filters on your mail service are the main reasons you would want to do it inside mutt, but that seems very challenging at best (and impossible at worst). Making this more general is left as an exercise. But I wouldn't recommend it really. I find personally that downscoring top-posters is a pretty poor way to judge content. If it works for you, great, but you must not exchange email with very many normal people. :) -- David Champion • d...@bikeshed.us
Re: scoring top posters
On Wed, Jul 29, 2015 at 02:38:30PM -0500, David Champion wrote: Simplest idea I have is to add a procmail (or whatever) rule to detect top-posting, then insert a yes or no header into the message: X-Top-Posted: yes Then it's trivial to score it in mutt. and just to satisfy my curiosity, how would such a procmail rule look/work? -- Fred Smith -- fre...@fcshome.stoneham.ma.us - For him who is able to keep you from falling and to present you before his glorious presence without fault and with great joy--to the only God our Savior be glory, majesty, power and authority, through Jesus Christ our Lord, before all ages, now and forevermore! Amen. - Jude 1:24,25 (niv) -
Re: scoring top posters
Simplest idea I have is to add a procmail (or whatever) rule to detect top-posting, then insert a yes or no header into the message: X-Top-Posted: yes Then it's trivial to score it in mutt. * On 29 Jul 2015, Matthias Apitz wrote: Hello, I'm using scoring to mark, auto delete, ... certain mails I do not want to read. I'd like to auto-score top posters for the next mail. For the first mail it is not possible due to scoring is based on header lines. But the sender could be scored with -10 or -20 for the next mail... Any ideas how to implement this as automagically? Sorry, couldn't resist the top-posting. :) -- David Champion • d...@bikeshed.us