procmail
[Top] [All Lists]

The Mysterious Mailstat (was Re: Saving copies of msgs in Fido format)

1999-05-08 04:41:30
On 07 May 1999 13:34:36 -0700, Harry Putnam <reader(_at_)newsguy(_dot_)com>
wrote:
era eriksson <era(_at_)iki(_dot_)fi> writes:
or with mailstat).
Where can one read about mailstat?

It's a short script which comes with the Procmail distribution.
It's not really documented anywhere; it's included sort of as an
example of how you could do these things.

"Most people don't type their own logfiles;  but, what do I care?"

mailstat realizes it's reading its standard input from the terminal,
which is usually not what you want. (This is arguably not necessarily
better than no warning message at all, like when you just command
"cat" and it sits there and waits for you to start typing. If you
understand what it says, it's a useful hint the first time you run the
script. People should hopefully examine scripts a bit before running
them, though.)

Running it against .procmail.log gives output but where to read up on it?

Read the source, provided you understand a little bit of awk. The
first block of comments is probably enough to get you started (even if
you don't speak any programming language at all) ... and everything
after that is probably too cryptic for casual reading (Stephen's style
is inimitable :-)

The main gotcha is that it will truncate your log file unless you call
it up with -k. You might want to change it so this becomes the default
(possibly with a small wrapper rather than by modifying the script
itself).

Hope this helps,

/* era */

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

<Prev in Thread] Current Thread [Next in Thread>