Re: !Postprocess and e-mailed summary report

[email protected] (Paul Jarc)
Newsgroups gmane.comp.djb.syslog
Organization What did you have in mind? A short, blunt, human pyramid?
Message-ID <[email protected]>
"Robin Bowes" <[email protected]> wrote:
>> Paul Jarc wrote:
>>> "!{ messagewallstats - 2>&1 1>&3 | qmail-inject postmaster } 3>&1"
...
> I do not want to have the program messagewallstats writing STDIN to
> STDERR, which is how John's solution works.

I don't think you've understood what the above does.  John says he
patched messagewallstats so that it reads its input from stdin, writes
its normal output to stdout, and writes a summary repotr to stderr.
The pipe and redirections above send messagewallstats' stdout to the
rotated log, and the stderr output to email.

> I've patched messagewallstats so it reads from STDIN, and I'd like to
> send the output to qmail-inject. So, this will process the
> current log file and mail the output of the program to postmaster:
>
> !{ messagewallstats | qmail-inject postmaster }

That will do what you want it to do, assuming you quote it properly
for the shell.

> Am I correct in thinking that this will mean that the current log file
> will be not be written to an old file?

Yes.

> How can I achieve this?

Do you mean that you want the log to also be written to a rotated
file?  Or that you don't want it to be?


paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.