On Thursday 06 Apr 2006 16:30, Nikki Locke wrote:
> Thanks, Bob.
>
> I'm still ever so slightly confused, as I seem to have both
> /var/qmail/bin/maildirmake AND  /usr/lib/courier-imap/bin/maildirmake, and
> I'm not sure which one I'm supposed to use.
>
> It occurred to me to ask myself what version of courier-imap I had, so my
> fingers (which sometimes have a better memory than my brain) typed "ident
> /usr/lib/courier-imap/bin/maildirmake" - turns out I don't have ident.
> Wonder what package it comes with? Of course, "yum provides ident" provides
> thousands of hits :-( So I went to the source (Luke :-), and I've got 4.0.6
> (that's what the toaster says to install, so that's what I've got).

I think you need to use the courier-imap one, if the .SPAM folder is to be 
visible in squirrelmail. That's what happened when I installed 4.x, (for a 
customer) which has a whole acl (access control) system. Without it the 
folder just was not there.

so:

MAILDIRMAKE="/usr/lib/courier-imap/bin/maildirmake"
MAILDIRACL="/usr/lib/courier-imap/bin/maildiracl"

use this where the simpler one is in the filter. It only gets used if there is 
no .SPAM directory, eg on the first time a spamassassin-detected email passes 
through the filter, one that has 'X-Spam-Flag: YES' in the headers.

`$MAILDIRMAKE -f SPAM $VUSERDIR/Maildir;$MAILDIRACL -set \
$VUSERDIR/Maildir INBOX.SPAM owner aceilrstwx;chown -R vpopmail.vchkpw \
$VUSERDIR/Maildir/.SPAM`

(note the backticks)

I worked this out by creating a folder in squirrelmail and then looking to see 
what it did ;-)

As I recall there was a man page for maildiracl.
I don't have access to that box anymore, and my own box is running an older 
version of courier-imap which works OK so I haven't changed it.

>
> Nikki
>
> [I've top posted this because in this rare instance it seemed to be clearer
> - hope you don't mind.]
>
> Bob Hutchinson wrote:
> > 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