Setting procmail to mark email as read

Submitted by Fekete Zoltán on

Use this code in your .procmail/rc.filters as a template:

:0
* ^Subject:.**SPAM**.
{
foldername=.Spam

:0c
.$foldername/ # stores in .$foldername/new/

:0
* LASTFOLDER ?? //[^/]+$
{ tail=$MATCH }

TRAP="mv $LASTFOLDER .$foldername/cur/$tail:2,S"

HOST
}