File maildroprc of Package maildrop
# Global maildrop filter file
#
# NOTE1: It is _NOT_ necessary to restart QmailLDAP/Controls!
# NOTE2: Users maildrop filter will be included at the very bottom!).
# Just incase user don't have a shell
SHELL="/bin/sh"
MAILDIRNAME=".Maildir"
SPAMDIRNAME="SPAM"
MAILDIR="$HOME/$MAILDIRNAME"
DEFAULT="$MAILDIR"
SPAMDIR="$MAILDIR/.$SPAMDIRNAME"
SPAMC="/usr/bin/spamc"
# import MAILDIRQUOTA
#MAILDIRQUOTA=0
#logfile "/var/log/maildrop.log"
# Create Maildir if it doesn't exits
`test -d $MAILDIR`
if( $RETURNCODE != 0)
{
`maildirmake $MAILDIR`
}
#
# Scan for SPAM
#
`test -f $HOME/.nospamcheck`
if( $RETURNCODE == 1 )
{
#include "/etc/mail/maildrop/maildroprc.spam"
# Global maildrop SPAM filter file
#
# NOTE1: It is _NOT_ necessary to restart QmailLDAP/Controls!
# NOTE2: Users maildrop filter will be included at the very bottom!).
#
# --------------
#`test -e $HOME/.nospamcheck`
#if ($RETURNCODE==1)
#{
`test -x $SPAMC`
if ( $RETURNCODE == 0 )
{
`test -d $SPAMDIR`
if ( $RETURNCODE == 1 )
{
`maildirmake -f $SPAMDIRNAME $MAILDIR`
#echo "INBOX.$SPAMDIRNAME" >> ./courierimapsubscribed
}
xfilter "$SPAMC -f -u $LOGNAME"
}
#}
}
# --------------
# Apply User mail filter
#
`test -f $HOME/.mailfilter`
if ( $RETURNCODE == 0 )
{
include "$HOME/.mailfilter"
}
#
# Scan for SPAM
#
#`test -f $HOME/.spamcheck`
#if( $RETURNCODE == 0 )
#{
# include "/etc/maildroprc.spam"
#}
# move spam to the spam dir.
# if the user mailfilter does not move
# spam to the spam dir.
if ((/^X-Spam-Status: *yes/))
{
to "$SPAMDIR/"
}
#
# Deliver mail
#
to "$MAILDIR/"