stdout
Matthias Andree
matthias.andree at gmx.de
Wed Sep 24 20:56:13 CEST 2003
Tom Anderson <tanderso at oac-design.com> writes:
> Hi all,
>
> I'm writing a Perl script to proxy my train-on-error requests via email,
> and I've run into a slight wall. Everything is working correctly,
> except I can't capture the output from my "bogofilter -Sn (or -Ns)"
> system calls. I've tried all kinds of piping and redirecting,
> backticks, exec, etc., and bogofilter continues to send it's -v output
> to the terminal (when testing on the terminal). Is it bypassing
> stdout?
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.
> Is there a way to capture -l output as well? All I want to do is
> return some sort of status via email besides that it exited correctly.
You can add 2>&1 to your bogofilter call to have stderr and stdout
captured.
> Also, can a string be passed into bogofilter instead of a file?
Via bogofilter stdin, yes.
> I tried piping echo, but that caused "extra info" errors.
Please show the exact command line you've used (if it's file lines of
Perl, fine, show them).
> Creating a temp file to give bogofilter seems to be an unnecessary
> extra step.
Indeed it is.
--
Matthias Andree
Encrypt your mail: my GnuPG key ID is 0x052E7D95
More information about the Bogofilter
mailing list