Paul Bartlett asked,
| I finally perfected a simple, reusable recipe for
| throwing selected mails into the bit bucket and recording the action in
| a condensed one-line entry in the logfile. However, I would also like
| to record the message size for documentation purposes, and for that I
| need the size in a variable, but I have not figured out how to capture
| that information. I presume it must exist somehow, because procmail
| can use it in a condition line. Any suggestions gratefully received.
First, if you have a logfile defined (and clearly you do) and LOGABSTRACT is
set to "on" or "all", procmail will leave an abstract in the logfile that
includes the number of bytes written to the action line. If you have no
action line for these messages and you're getting rid of them by unsetting
HOST, however, I don't know if that information appears.
If you want to find it out yourself and do something else with it,
:0HB # note trailing period in first condition line
* 1^1 .
* 1^1 ^.*$
* -1^0
{ }
SIZE = $=
The extra -1 is to make up for a quirk in procmail's scoring of the second
condition (it will always count one more line than there really is).