Martin Gregorie wrote:
I need to scan a set of archived mbox files for spam, mark the messages
appropriately, and save them in a second mbox file. Should the following
command do what I want?
spamassassin --mbox <mbox >scanned.mbox
No, SA doesn't know how to split up messages for scanning; sa-learn is
the only SA component that can extract messages from an mbox mail folder.
You want something like this:
$ formail -s procmail -m checkem.rc < archived-mbox
checkem.rc should contain one or more procmail recipes to call SA
(probably better to use spamc instead of spamassassin) and file the
message as desired.
If I accidentally mangled my own personal mail flow such that everything
got put in my system inbox, for instance, I might just move my system
mailbox file from /var/spool/mail to ~/spammy-inbox, and run:
$ formail -s procmail -m ~/.procmailrc < ~/spammy-inbox
(I'd move the mailbox out of /var/spool/mail so I didn't keep appending
old messages to the end of it over and over; some mail *does* get
delivered there.)
I'm currently running spamc/spamd and know that works strictly one
message at a time, but don't understand the ins and outs of using SA to
process bulk files. I've read through the man pages and online
documentation but didn't see an explicit answer to this question.
Apologies for wasting bandwidth if I should have seen it.
Hmm. I'm pretty sure it's pointed out in several places that SA does
not know how to process more than one message per call, but I've been
using it long enough that I just know that's how it works. <g>
-kgd