On 28-Jan-2009, at 10:25, Karsten Bräckelmann wrote:
On Wed, 2009-01-28 at 09:25 -0700, LuKreme wrote:
What I wanted to know is I could use a combination of formail and
procmail to feed each measdsge to sa-learn one at a time.
Sure. See the -s option in 'man formail'.
formail -s ${command_per_mail} < ${mbox}
Right. As I originally posted:
formail -s procmail -m salrc <SPAM
salrc:
:0 fw
| sa-learn --spam
You will need procmail only, if you actually want to *conditionally*
perform action, e.g. skip learning of messages already scoring a high
Bayes value. Without any conditions (including post-processing and
different delivery targets), procmail just complicates things here.
Also, keep in mind that procmail would *deliver* the mail -- careful
with that, unless you want the learned messages to be fed to the
user's
Inbox again. ;-)
No, what I want to do is process the current SPAM mailboxes before I
setup an automated learning on all future SPAM tagged mail
Another caveat is, that calling a sa-learn process for *each*
message is
quite expensive. Having a look at the spamc/spamd options for learning
might be a good idea.
Wha? spamc has learning options?
waddayaknow
-L learn type, --learntype=type
Send message to spamd for learning. The "learn type" can
be either
spam, ham or forget. The exitcode for spamc will be set
to 5 if
the message was learned, or 6 if it was already learned.
Note that the "spamd" must run with the "--allow-tell"
option for
this to work.
OK, so I'm not seeing an --all-tell in the ps output, so I will need
to change /usr/local/etc/rc.d/spamd.sh?
/usr/local/bin/spamd -d && echo -n ' spamd'
to
/usr/local/bin/spamd -d --allow-tell && echo -n ' spamd'
and then just
:0 fw
| spamc -L spam
well, that's better than throwing future messages at sa-learn.
--
Battlemage? That's not a profesion. It barely qulaifies as a
hobby. 'Battlemage' is about impressive a title as 'Lord of the
Dance'. <PAUSE> I'm adding Lord of the Dance to my titles.