procmail
[Top] [All Lists]

Re: PIPE in a envvar?

1997-04-13 08:23:00
At 04:00 PM 4/10/97 -0700, Professional Software Engineering - Lists account 
wrote:

(wanted to do:)
$DEFAULT=| gzip -9fc>>$MAILDIR/mbox.gz

[snip]

Unfortunatley, I was using the DEFAULT variable expansion at various
locations in my recipes for when they needed to do something and terminate
filtering there.  Most likely not the way to do it, but it is the way I'm
accustomed to doing it.  So if I decide to change this, I guess I have to
go tweaking it in various locations.  Bummer, but liveable.

Couldn't you do something like the following?:
  DELIVERYMETHOD="gzip -9fc>>$MAILDIR/mbox.gz"

and then, wherever you have $DEFAULT for delivery, replace it with:
  | $DELIVERYMETHOD

Just a thought for maintainability.  In a pinch, you can even go back
for the price of a useless cat, by changing it to:
  DELIVERYMETHOD="cat >> $DEFAULT"

Cheers,
Stan

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