Here's the filter I use.  You need to change the $VMAILDIR variable in
the last "to" line on yours to read just "./Maildir/"

import EXT
import HOST
import HOME
MAX = 99

if ($SIZE < 262144)
        xfilter "/usr/bin/spamc -p 1783 -f -u [EMAIL PROTECTED]"

if ((/^X-Spam-Status: Yes, hits=![0-9]+\.[0-9]+!.*/:h && $MATCH2 >

if ((/^X-Spam-Flag:.*YES/))
   `test -d ./Maildir/.SPAM`
   if( $RETURNCODE == 1 )
   `maildirmake ./Maildir/.SPAM;chown -R vpopmail.vchkpw
   `/home/vpopmail/ ./`
   to "./Maildir/.SPAM/"

to "./Maildir/"

-----Original Message-----
From: Rodney M [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 7:53 PM
Subject: [vchkpw] vpopmail, maildrop and spamassassin problem

I'm trying to get maildrop and spamassassin up and running with vpopmail

but am having some problems.  Below is my server setup:

freebsd 4.8-release
maildrop-1.5.2 (installed from ports)
spamassassin-2.60 (installed from ports)
qmail-1.03_2 (installed from ports)

I am trying to get this working for a single vpopmail user before I turn

it loose on the whole domain.  In the directory 
/home/vpopmail/domains/ I have created a .qmail file 
that contains:

|preline /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter

The contents of /home/vpopmail/etc/mailfilter are:

USERNAME=`echo ${PWD##*/}`
USERHOST=`PWDTMP=${PWD%/*}; echo ${PWDTMP##*/}`


# run through SpamAssassin (if less than the specified size)
if ( $SIZE < 262144 )
     exception {
        xfilter "/usr/local/bin/spamc -f -u [EMAIL PROTECTED]"

if (/^X-Spam-Flag: *Yes/)
     # try to deliver to the spam folder
     exception {

# process user's rules
exception {
     include $VMAILDIR/.mailfilter

# if it falls through to here, just put it in their inbox

When I try to send a message to [EMAIL PROTECTED], I see this in 

Dec 12 22:30:27 gigantic qmail: 1071286227.908530 starting delivery 756:

msg 321 to local [EMAIL PROTECTED]
Dec 12 22:30:27 gigantic qmail: 1071286227.908975 status: local 1/10 
remote 0/120
Dec 12 22:30:27 gigantic maildrop[68428]: Unable to open mailbox. Dec 12
22:30:27 gigantic qmail: 1071286227.927171 delivery 756: 

I noticed that when you install maildrop from the ports collection, it 
defaults to running as root:mail.  I tried installing maildrop with 
--enable-maildrop-uid=vpopmail --enable-maildrop-gid=vchkpw but that 
didn't seem to fix anything.  I don't have spamd running as I would like

to just call spamassassin directly for now.

Any ideas why maildrop is not working?  I've looked thru the mailing 
list archives and google but no luck.  Any help would be appreciated. 


Reply via email to