mailfilter_move_junk.master 363 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

SPAMDIR="Junk"
SPAMDIRFULL="$DEFAULT/.Junk"

if ( /^X-Spam-Flag: YES$/ )
{
  exception {

    `test -e $SPAMDIRFULL`
    if ( $RETURNCODE != 0 )
    {
      `maildirmake -f $SPAMDIR $DEFAULT`
      `chown vmail:vmail -R $SPAMDIRFULL`
      `chmod 0700 $SPAMDIRFULL`
      `echo INBOX.$SPAMDIR >> $DEFAULT/courierimapsubscribed`
    }
    to "$SPAMDIRFULL/"
  }
}