I'm running fetchmail
on a AntiSpam server to get messages on user's junk folder to feed SpamAssassin bayesian filtering. It's been running nicely with the -m
option in fetchmail
to deliver the messages to SpamAssassin sa-learn
tool.
But I would like to start testing Bogofilter and feed the Bogofilter database accordingly. But to do this fetchmail
should deliver the messages to SpamAssassin and Bogofilter, and using the -m
was a no go.
There's a way to achive this with fetchmail
? I've considered some extra MDA's like procmail
or maildrop
, but I'm not sure if it's really necessary or if it will do the work.
EDIT: My actual fetchmail
command to fetch messages from the mail server:
echo "poll $mailserver proto IMAP user $domain\\$user\\$mailbox pass $passwd ssl" \
| fetchmail -a -n -p IMAP --folder "$junkfolder" -f - -m '/usr/local/bin/sa-learn \
-C /usr/mailcleaner/etc/mailscanner/spam.assassin.prefs.conf --spam'
EDIT: I GOT IT! Answering my own question...