A trick with perl
tanderso at oac-design.com
Mon Jan 5 09:58:20 EST 2004
On Mon, 2004-01-05 at 09:28, Boris 'pi' Piwinger wrote:
> So I want to keep it open, to avoid many calls on bogofilter.
I tried this by first building an mbox out of all of the emails and then
feeding that to bogofilter. Besides being much more memory-intensive,
it always locked on me for some reason after I closed the first mbox
(ham/spam) and then started the next. I never solved that, and instead
moved to the one-by-one method. Besides, this way it uses minimal
memory, though a little more CPU.
> 1) Is it OK to train with a different handle and still use
> the first open pipe (-TM to get ouput for each mail) to rate
Not using Open2. You have to close the write filehandle in order to
flush your output before bogofilter will finish reading and evaluate its
input. Failing to close the write filehandle will result in a
deadlock. The only way to feed multiple emails is by sending them as an
mbox or other folder type.
Unless bogofilter interprets some other EOF midstream?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.bogofilter.org/pipermail/bogofilter/attachments/20040105/c6e1e4d8/attachment.bin
More information about the Bogofilter