January 30, 2008
There is no clean way to do this, but I stilled needed to do it so I wrote this hack. Use it at your own risk. I’m using it for the spam mails I get, which have been marked by spam assassin. This mails should be delivered into the Junk folder and be marked as read so only new ham messages are counted/shown if I open my mailbox.
Download the markasseen.py script to
/usr/local/sbin/ and set the executable flag. Now you only need to write following into the wished
# filter spam mails and mark them as read
Important: This script is only safe to use if all messages in a given folder should be marked as read!!
If you’ve a better way to mark messages as read on delivery tell me!