16 Sep

Mail Assassin - Gnus kill thread feature in Mail.app

Sunday September 16th 2007, 10:38 pm
Tags: , , ,

Gnus has a feature called “kill thread”. When reading high traffic mailing lists you often only read specific threads. All the others you are not interested in, you just “kill”. Then all follow-up mails are automatically marked read. Easy but very effective.

I finally managed to have the same in Apple’s Mail.app. The idea is to use the great Mailtags extension and the Act-on extension by the same author. It does not work yet with the 2.1 release, only with a snapshot from the author. Hope the needed parent feature is added soon to the release as well.

The latter is used to add an Act-on rule to add the “Killed” keyword to the current mail (use this to kill a thread):

kill-action.png

The former is used to kill incoming mails when a (grand*)parent is “Killed”:

kill-rule.png

The script being used there is “Mail Assassin.applescript”:

on Logger(str)
do shell script "logger Mail Assassin - " & str
end Logger

on assassinate(msg)
set kill to false
set threadMsg to msg
try
repeat until false
using terms from application "MailTagsScriptingSupport"
set threadMsg to parent of threadMsg
set kwds to keywords of threadMsg
end using terms from
if kwds contains "Killed" then
set kill to true
end if
end repeat
end try
if kill is true then
Logger("Have to kill: " & subject of msg & "")
using terms from application "Mail"
set read status of msg to true
end using terms from
else
-- Logger("Lucky mail: " & subject of msg & "")
end if
end assassinate

using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with msg in theMessages
assassinate(msg)
end repeat
end perform mail action with messages
end using terms from

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit

2 Comments »

 

RSS feed for comments on this post. TrackBack Website

Leave a comment

(required)

(required)

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>