stdout

Tom Anderson tanderso at oac-design.com
Fri Sep 26 17:11:57 CEST 2003


Matthias,

> No, it just prints to stderr. I wouldn't call that bypassing since
> stderr is a standard facility of avoiding piping mail somewhere where
> you don't want it.

You're right... I thought I had all of my bases covered by using the -D
switch, however that only directs -v to stdout; -vv(vv) still gets split
between stdout and stderr.  

> You can add 2>&1 to your bogofilter call to have stderr and stdout
> captured.

I thought of that too, but when I do that, the stderr string gets
concatenated in the middle of the stdout string, or vice versa,
particularly when using the more verbose outputs.  My current solution
is to direct stderr to a file, and then read that in and paste it where
I want in my output.  If bogofilter could output more reliably, maybe I
could eliminate this extra step.

> Please show the exact command line you've used (if it's file lines of
> Perl, fine, show them).

Since the purpose of my script is to accept multiple train-on-errors in
a single email, I've instead opted to create two mbox files for the
false positives and false negatives.  Even if I could pipe each
individual email directly to bogofilter, I find that the results are
better using the mboxes, since then the report will state in one line
(for each of negatives and positives) the number of tokens and messages
processed.  Doining it one-by-one is harder to digest.  BTW, I don't
think I tried piping it as suggested, but rather redirecting (via "<")
stdin to the output of echo.  I'm sure there must be a subtle
distinction of which I'm not aware.

I'll post a link to my script when it's done in case anybody else can
find it useful.

Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20030926/6082a9be/attachment.sig>


More information about the Bogofilter mailing list