[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Maildrop + SA



> So, I would like send spams (witch my SA didn't catch) to e-mail
> spam@domain.com and my maildrop use sa-learn in this e-mail.
> How can I do that in my maildrop???

Be careful about doing this. Things that you forward to spam@domain.com will appear to come from your address, so you may accidentally teach SpamAssassin to negatively score messages from your domain.

A better solution is to export a maildir as a shared IMAP folder, and then drag-and-drop spams there with your mail reader. The spam will not be changed by another run through the MTA, which will improve the effectiveness of sa-learn.

You could then run a cron job against that maildir like this:

IFS='
' for i in $(find /my/spam/maildir -type f)
do
	sa-learn --spam "$i" && rm "$i"
done


Gilberto Villani Brito wrote:
Hi,
I have a server with qmail + vpopmail + spamassassin + maildrop.
My maildrop use spamc to mark spam and move it to other dir.

So, I would like send spams (witch my SA didn't catch) to e-mail
spam@domain.com and my maildrop use sa-learn in this e-mail.
How can I do that in my maildrop???

I tried this:

--- mailfilter
import EXT
import HOST
SHELL="/bin/sh"
VPOP="| /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/usr/local/vpopmail/bin/vuserinfo -d $EXT@$HOST`
VUSR=`/usr/local/vpopmail/bin/vhmchk.pl $EXT $HOST`
if ( $SIZE < 262144 )
{
exception {
                xfilter "/usr/local/bin/spamc -f -u $VUSR@$HOST"
        }
}
if (/^X-Spam-Flag: *YES/)
{
       to "/usr/local/vpopmail/domains/domain.com/spam/Maildir/"
       exit
}
else
{
        if (/^From:.*<giba@domain.com>.*/ && /^To: spam@domain.com/)        {
                to "/usr/local/vpopmail/domains/domain.com/spam/Maildir/.Spam/"
               # it stop here and the next comands don't execute
               '/usr/local/bin/sa-learn --spam /usr/local/vpopmail/domains/domain.com/spam/Maildir/.Spam/new/*'
               'rm -f /usr/local/vpopmail/domains/domain.com/spam/Maildir/.Spam/new/*'
                exit
        }
        to "$VPOP"
       exit
}
----mailfilter


Hugs
Gilberto






Reply to: