Le lun 23/02/2004 � 18:26, Greg Wildman a �crit :
> Rodrigo Gesswein said the following on 16/02/2004 21:09:
> > Hello:
> >
> > I'm trying to setup spamc (spamassassin) to work with
> > qmail-ldap. My first approach was:
> > http://marc.theaimsgroup.com/?l=qmail-ldap&m=106279577609165&w=2
> > but I noticed that user's quotas aren't updated
> > ($HOME/maildirsize). So, I'm looking for maildrop:
>
> <snip>
>
> I am using a simple maildrop setup. For each user that wants spam
> filtering I set the deliveryProgramPath attribute for that account.
>
> E.g.
>
> deliveryProgramPath: maildrop /var/qmail/mail/maildrop_SPAM_filter
>
>
> The default maildrop file (maildrop_SPAM_filter) contains the following:
>
> # Default SPAM maildrop filter.
> #
> # If the SPAM folder exists then dump it in there (for IMAP users) else
> # it goes to INBOX.
>
>
> if ( $SIZE < 262144 )
> {
> exception {
> xfilter "/usr/bin/spamc -f -u $USER"
> }
> }
>
>
> if (/^X-Spam-Flag: *YES/)
> {
> # then try delivering it to a Spam folder
> exception {
> to "./Maildir/.SPAM/"
> }
> # ah well, I guess they'll just have to live with disappointment
> exception {
> to "./Maildir/"
> }
> }
> else
> {
> exception {
> to "./Maildir/"
> }
> }
>
>
>
>
> --
> Greg
Hi all,
I have setting up maildrop with spammassassin and qmail-scanner. This is
my configuration :-).
/var/qmail/bin/spam_filter
-------------<SNIP>----------------
LOGDIR="/tmp"
logfile "$LOGDIR/maildroprc.log"
log "Filter start"
`test -d ./Maildir/.SPAM`
if ( $RETURNCODE == 1 )
{
log "Create SPAM box"
`/usr/local/bin/maildirmake -f SPAM ./Maildir`
`echo INBOX.SPAM > ./Maildir/courierimapsubscribed`
}
if ( /^X-Spam-Status: Yes/ )
{
exception {
log "Deliver to $USER"
to "./Maildir/.SPAM/"
}
exception {
to "./Maildir"
}
}
else
{
to "./Maildir/"
}
log "Filter finish"
--------------<SNIP>----------------
I setup account with :
qmaildotmode : ldapwithprog
deliveryprogrampath : /usr/local/bin/maildrop /var/qmail/bin/spam_filter
delivrymode : nombox
/etc/mail/spamassassin/local.cf
-------------<SNIP>----------------
rewrite_subject 1
spam_level_stars 0
report_safe 0
subject_tag *****SPAM*****
use_terse_report 0
skip_rbl_checks 0
check_mx_attempts 2
check_mx_delay 5
-------------<SNIP>----------------
It works very well :-).
Best regards,
Sylvain