Hello,
I hope that this is indeed a maildrop problem and not a qmail or
vpopmail. If not, please forgive me for posting in the wrong mailing list.
I have a vpopmail/qmail/courier setup that works great. I have
implemented spam filtering in the following manner:
|preline /usr/bin/maildrop /var/lib/vpopmail/etc/mailfilter
/var/lib/vpopmail/domains/mydomain.com/user/Maildir/
in the user's .qmail file. The mailfilter used is as follows
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`
}
`/usr/bin/test -d $VHOME/.spamassassin`
if( $RETURNCODE != 0 )
{
`/bin/mkdir $VHOME/.spamassassin`
}
if ( $SIZE < 262144 )
{
xfilter "/usr/bin/spamc -f -u $EXT@$HOST"
if (/^X-Spam-Flag: *YES/)
{
EXITCODE=99
to "$VHOME/Maildir/$SPAMFOLDER"
}
}
The filter runs spamassassin, and if it's found to be spam, delivers it
to the spam folder and exits with exit code 99. Exit code 99 tells
dot-qmail to stop processing the .qmail file so that it won't deliver to
the local mailbox or any forwards the user has specified. If the
message is not found to be spam, dot-qmail continues processing the
.qmail file. Everything works great when it's found to be spam. When
the message is found to be ham, the delivery happens to the user's
maildir, as expected, but a copy of the message is also sent to the
local mbox of the user running maildrop, in this case vpopmail, at
/var/mail/vpopmail.
First off, do you think that this is a maildrop problem? If not, I'll
go barking up another tree. If so, what could be causing it. When
maildrop handles the delivery, everything goes fine, but I need a way to
exit maildrop without delivering, without having it deliver to the
running user's mbox.
Thanks