Hi All,
I have a pretty simple mailfilter that works beautifully with not only
filtering Spam into the correct folders, but properly flowing through
all the .qmail-default, .qmail files. (In a vpopmail system)
This is what I have in domain.com/.qmail-default:
|maildrop mailfilter
| /usr/home/vpopmail/bin/vdelivermail\
'' bounce-no-mailbox
My mailfiler file:
SHELL="/bin/sh"
VPOP="| /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/usr/local/vpopmail/bin/vuserinfo -d $EXT@$HOST`
MAILDIR=$VHOME/Maildir
if (/^X-Spam-Status: Yes*/)
{
/^X-Spam-Status: yes, (hits|score)=![:digit:]+\.[:digit:]+!.*/
if ( $MATCH2 >= 10.0 )
{
exception {
EXITCODE = 99
to "/dev/null"
exit
}
}
}
`/home/vpopmail/domains/domain.com/getsvclvl.pl $EXT $HOST`
if ($RETURNCODE == 1)
{
exit
}
`test -d $VHOME/Maildir/.Spam`
if ( $RETURNCODE == 1 )
{
`/usr/local/bin/maildirmake -f Spam $VHOME/Maildir`
}
if (/^X-Spam-Status: Yes*/)
{
exception {
EXITCODE = 99
to "$VHOME/Maildir/.Spam/"
exit
}
}
exit
This works wonderfully with spamassassin, but now I want to try dspam.
I have to alter my .qmail-default as such (I use simscan, and can't
locate any decent patches to combine the two):
|/usr/local/bin/dspam --user $EXT@$HOST --deliver=innocent,spam \
--mode=teft --feature=chained,noise,whitelist --stdout | maildrop \
mailfilter -A "X-MailDrop: Yes"
Then I also have to drop the 'exit' at the end of my mailfilter, and
replace it with:
to "$VPOP"
This initially works, except I'm the postmaster for multiple domains,
and have a .qmail file under postmaster/ that redirects the email to me.
These accounts I never get emails for - the .qmail file is never read.
This is why I have the 'EXITCODE's and the vdelivermail in
the .qmail-default. For some reason .qmail is ignored when vdelivermail
is run from maildrop.
Now, I can fix that by creating a domain/.qmail-postmaster, but without
the user's .qmail being read, vacations and forwards won't be handled
properly.
maildrop 2.0.2
Any suggestions? Now I'm wondering if this is a vpopmail issue - but I
have newer versions on other servers with, I'm quite sure, the same
results.... Though honestly it took forever to figure this out the
first time and I'm only now revisiting it due to dspam..
Thanks
Rick