> So, I would like send spams (witch my SA didn't catch) to e-mail > [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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"
doneGilberto 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
VUSR=`/usr/local/vpopmail/bin/vhmchk.pl $EXT $HOST`
if ( $SIZE < 262144 )
{
exception {
xfilter "/usr/local/bin/spamc -f -u [EMAIL PROTECTED]"
}
}
if (/^X-Spam-Flag: *YES/)
{
to "/usr/local/vpopmail/domains/domain.com/spam/Maildir/"
exit
}
else
{
if (/^From:.*<[EMAIL PROTECTED]>.*/ && /^To: [EMAIL PROTECTED]/) {
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
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

