procmail
[Top] [All Lists]

Re: Trying to use $1 from -a argument

1995-11-30 14:29:03
srb(_at_)cuci(_dot_)nl (Stephen R. van den Berg) said:

SRvdB> Sten Drescher <dreschs(_at_)mpd(_dot_)tandem(_dot_)com> wrote:

It's annoying having to do a 'FILED=$-' every time I want to see if a
mail has been filed and carboned.

SRvdB> I don't really see what the problem is here.  What do you mean,
SRvdB> "every time"?  What does this have to do with $1?

        It doesn't, it refers to another use of variablename ?? that I
do.  I'm making the assumption that LASTFOLDER is a pseudovariable as
well, right?  I have several recipies which depend on whether the
messsage is being carboned or not, and they aren't all in one block, or
even in the same direction.

SRvdB> * ARGUMENT ?? ^^[^/ ]+^^ mail.$1.spool

I there any particular reason for doing it this way, rather than '*
ARGUMENT ?? .+'?

SRvdB> Yes.  But this was left as an excercise to the reader.  Now you
SRvdB> make me say it, this is normally not how things work :-).  It
SRvdB> makes sure that the *entire* value of argument does not contain
SRvdB> blanks or slashes.  This avoids opening up some possible security
SRvdB> holes.

        Ah, I hadn't set my paranoid mode on today.

-- 
#include <disclaimer.h>                         /* Sten Drescher */
To get my PGP public key, send me email with your public key and
        Subject: PGP key exchange
Key fingerprint =  90 5F 1D FD A6 7C 84 5E  A9 D3 90 16 B2 44 C4 F3

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