www.nathanbower.com
# Use maildir-style mailbox in user's home directory
# Allows Spamc to catch spam, then sorts the spam into a spam folder, and marks as read
# Procmail - spamassasin - courier-imapd setup

#VERBOSE=yes
LOGFILE=/var/log/procmail
PATH=/usr/bin

#:spamc-lockfile
:0fw
* < 1024001
| /usr/bin/spamc


:0
* ^Subject.*SPAM*
{
        spamfolder=$HOME/.maildir/.spam

        :0 c
        $spamfolder/

        :0 chi
        * LASTFOLDER ?? /\/[^/]+$
        | mv $LASTFOLDER $spamfolder/cur/$MATCH:2,S

        :0
        /dev/null
}