SHELL="/bin/sh" VPOP="| /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox" VHOME=`/usr/local/vpopmail/bin/vuserinfo -d $EXT@$HOST` VUSR=`/usr/local/vpopmail/bin/vhmchk.pl $EXT $HOST` if ( $SIZE < 262144 ) { exception { xfilter "/usr/local/bin/spamc -f -u $VUSR@$HOST" } } if (/^X-Spam-Flag: *YES/) { `test -d $VHOME/Maildir/.Spam` if ( $RETURNCODE == 1 ) { `/usr/local/bin/maildirmake -f Spam $VHOME/Maildir` } # try filtering it using user-defined rules exception { include $VHOME/Maildir/.mailfilter } # then try delivering it to a Spam folder exception { to "$VHOME/Maildir/.Spam/" } # ah well, I guess they'll just have to live with disappointment exception { to "$VPOP" exit } } else { exception { include $VHOME/Maildir/.mailfilter } exception { to "$VPOP" exit } }