procmail
[Top] [All Lists]

Re: varname=| construct broken?

2004-02-20 15:05:33
I think I originally had my assignment inside the block of a copy and
then tried to use the variable later, but I guess the scope of the
variable is just that block.  I then turned on verbose and noticed the
assignment appeared to be null, so I simplified my case to demonstrate
the null assignment in the log when in fact my problem was the scoping
issue.  The logs are quite misleading.  Sorry to have wasted your time.

:0c
{
        some stuff
        :0
        myvar=|myprogram
}
..
$myvar is not set here!

-----Original Message-----
From: Dallman Ross [mailto:dman(_at_)nomotek(_dot_)com] 
Sent: Friday, February 20, 2004 2:05 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: varname=| construct broken?


On Fri, Feb 20, 2004 at 01:25:22PM -0700, Ian D. wrote:

I can't get this to work at all.  I've tried procmail 3.15.2 on Solaris 8
and procmail 3.22 on Redhat 8, same results on both.

:0h
FROM=| formail -xFrom:

procmail: Assigning "FROM="   <=========================WHY BLANK???

As Bart said, there could be a problem with the instance of procmail
running on your system.  There is a bug with certain compiles and
certain systems.  However, jsut because the log shows blank there
does *not* mean there is a problem.  That's how the log looks
normally on pipe-assignment recipes.  You can see the actual
value in the log by typing in your rc,

   LOG = "
   FROM is $FROM
   "

Also, if you *do* have a procmail binary that has a problem with
the assignment syntax, you can still do it this way:

   FROM = `formail -xFrom:`

-- 
dman


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail