Option for spam filters that require explicit delivery
This patch adds a compile-time option that allows you
to specify wether or not the spam command given in
--enable-spam-command requires explicit delivery. In
this case, a local delivery line is added after the
spam filter. This can be useful in the case of a spam
filter that doesn't do the delivery, but simply sets an
exit code for vpopmail. This can be useful for users
forwarding a copy of their email to a seperage PDA
email account. vpopmail, seeing exit code 99 from the
spam filter will halt delivery to all following .qmail
lines.
An example of a spam filter like that is the following
maildrop filter:
VHOME=`/usr/sbin/vuserinfo -d $EXT@$HOST`
SPAMFOLDER=".Spam"
`/usr/bin/test -d $VHOME/Maildir/$SPAMFOLDER`
if( $RETURNCODE != 0 )
{
`/usr/bin/maildirmake $VHOME/Maildir/$SPAMFOLDER`
}
if ( $SIZE < 262144 )
{
exception {
xfilter "/usr/bin/spamc -f -u $EXT@$HOST"
}
if (/^X-Spam-Flag: *YES/)
{
exception {
EXITCODE=99
to "$VHOME/Maildir/$SPAMFOLDER"
}
}
}
Patch
Thanks