procmail
[Top] [All Lists]

Re: Procmail patch to avoid growing humungous log files with VERBOSE=on

1997-08-13 19:06:00
In message <199708132259(_dot_)RAA09389(_at_)solen(_dot_)gac(_dot_)edu>, Philip 
Guenther writes:
Bradley Ward Allen <ulmo(_at_)Q(_dot_)Net> writes:
...
My other patch to ProcMail is a hack -- I set "rawnonl=1" everywhere
everywhere everywhere!  I use MH and have absolutely no use for the
extra newline, and as a matter of fact am religiously opposed to it.
When I found it it pissed me off so much I didn't care whether I kept
backwards compatability, so I never posted it, but here it is anyway.
That seems like a harder patch for me to understand than the verbose
thing.  But here is a clue:

I still cannot see why the 'r' flag is not sufficient for your purposes.

I forgot, I can explain: my use is a pigeon-hole, but it's a fat pigeon:
I use Panix's shared filters, and what it does is designate a whole bunch
of messages out to $TRASH.  There really are a lot of options I'd like to
operate on an action; if there were some way to carry the options over to
just an action piece, I'd be happy (such as routing arbitrary actions to
a specified recipe using some new syntax; then I could use all the recipe
flags, such as r).

I guess you could argue that $TRASH is stuff I don't want, but I hadn't
really thought hard about that yet; I suppose I could use "r" for everything
I specify, including DEFAULT=/home/ulmo/.mail/spool/; you see, there you go,
DEFAULT is not a recipe, it is an action, and I need everything in that
spool directory to be rawnonl (it happens to take on a
MSGPREFIX=`date "+%Y%m%d%H%M%S.$HOST.$$."` since I then do
TRAP=/home/ulmo/.mail/spin which is my old shell script that would go through
and process emails one by one load permitting, but that seems so irrelevent,
what if my DEFAULT were /home/ulmo/inbox/.?  It would be the same problem.)

I guess I can make a recipe like this at the end of the .procmailrc:

:0r:
/home/ulmo/.mail/spool/

Ok, so with that final recipe, if it works (it does, right?), $TRASH would
get file munging but nothing else would.  So I'd have to have a shell script
go through and unmunge the $TRASH, in the event I need to forward a +junk
message (which is actually quite possible if I need to investigate spam)
or in case the large filters accidentally grabbed a real message.  Seems
so silly to me to have a shell script undue something I never wanted done in
the first place ...

That's my dilemma: I really think a way to direct an action at a recipe
is the correct solution, because of all those juicy recipe flags, so I never
did a proper patch (for lack of time).

Attachment: pgpzknNFEyX9K.pgp
Description: PGP signature