On Thursday 06 Apr 2006 13:00, Nikki Locke wrote:
> Bob Hutchinson wrote:
> > On Wednesday 05 Apr 2006 19:55, Nikki Locke wrote:
> > > I would like to sort my spam tagged email into a separate spam folder
> > > automatically. I've seen lots of different ways to do that, or varying
> > > complexity, on the 'Net.
> > >
> > > Is there an easy way, that works well with the Toaster?
> >
> > yeah, maildrop
> > search the archive for this list for details, roundabout mid-february
>
> Thanks for that. I've had a look, and my brain hurts! Yet another perl-like
> language to learn, just to separate mail into two IMAP folders. Perhaps
> when I get over this cold I'll feel more up to it :-)

maildrop is picky about it's filter files and not very helpful about spotting 
errors ;-(

here is a filter to kick-start you (watch out for wrapping):
import EXT
import HOST

VPOPBIN="/home/vpopmail/bin"
QMAILDIRMAKE="/var/qmail/bin/maildirmake"

VUSERDIR=`$VPOPBIN/vuserinfo -d [EMAIL PROTECTED]
VMAILDIR="$VUSERDIR/Maildir"
SPAMDIR="$VUSERDIR/Maildir/.SPAM"

if (/^X-Spam-Flag: *YES/)
{
        `test -d $SPAMDIR`
        if( $RETURNCODE == 1 )
        {
                `$QMAILDIRMAKE $SPAMDIR;chown -R vpopmail.vchkpw $SPAMDIR`
        }
        to $SPAMDIR/
}
else
{
        to $VMAILDIR/
}

#################################
# use this for courier-imap v4.xx
# MAILDIRMAKE="/usr/lib/courier-imap/bin/maildirmake"
# MAILDIRACL="/usr/lib/courier-imap/bin/maildiracl"
# `$MAILDIRMAKE -f SPAM $VUSERDIR/Maildir;$MAILDIRACL -set $VUSERDIR/Maildir 
INBOX.SPAM owner aceilrstwx;chown -R vpopmail.vchkpw $VUSERDIR/Maildir/.SPAM`
#################################

then put something like this in your .qmail-user file

|/usr/local/bin/maildrop  /home/vpopmail/domains/mydomain.com/spam-mailfilter


-- 
-----------------
Bob Hutchinson
Midwales dot com
-----------------

Reply via email to