procmail
[Top] [All Lists]

Why doesn't this work? (setting variables)

1997-04-02 02:26:00
I am running procmail 3.10 and have the following problem: I want to pipe  
something to procmail which then uses a specific RC file. This rc file  
includes another RC file. That included RC file sets various variables.

This setting of the variables works when procmail does its usual job  
(installed as local mailer in sendmail.cf).  But when I run procmail from  
the command line it seems that the system variables like $PATH and such  
(which are set in a setenv file) are not set.

When I paste by hand, I get:

command:
        paste | procmail /usr/local/nocem-e/rc/rc.ok

output:
        process_ncm: process_ncm: cannot open
        /Users/gerben//backup: Not a directory.

Which means that PATH and other variables seem not to be set. But they  
*are* set when procmail is run from sendmail as local mailer.

Can someone help we with this? I include the relevant rc files below.

My .procmailrc looks like this:
===================================================================
INCLUDERC=/usr/local/nocem-e/procmailrc
===================================================================

And /usr/local/nocem-e/procmailrc looks like:
===================================================================
INCLUDERC=/usr/local/nocem-e/setenv

INCLUDERC=$PMDIR/rc.safety
INCLUDERC=$HOME/.procmailrc-personal
INCLUDERC=$PMDIR/rc.nocem-e
INCLUDERC=$PMDIR/rc.Doumakes
===================================================================

And /usr/local/nocem-e/setenv looks like
===================================================================
#!/bin/sh
# This file sets the system-wide environment for NoCeM-e

# This is where you installed NoCeM-e
NOCEMEDIR=/usr/local/nocem-e

# Whatever you like
VERBOSE=OFF

# Restric path to NoCeM-e and normal programs
PATH=$NOCEMEDIR/bin:/bin:/usr/bin:/usr/local/bin

# Where your personal mail lives
MAILDIR=$HOME/Mailboxes

# Where the system delivers your mail
ORGMAIL=/usr/spool/mail/$LOGNAME

# This is where procmail writes its log
PMLOG=$HOME/tmp/procmail.log

# This is where the user home directories live
USERROOT=/Users

# Below this, ou need not change anything
PMDIR=$NOCEMEDIR/rc
PERSONALRC=$HOME/.procmailrc-personal
PERSONALNCMPGPDIR=$HOME/.pgp_ncm
PERSONALPGPRING=$PERSONALNCMPGPDIR/ncm.pgp

# Just to be sure
IFS=' '
SHELL=/bin/sh

# And last but not least
NOCEMVERSION=0.6
===================================================================

rc.ok looks like:
===================================================================
INCLUDERC=/usr/local/nocem-e/setenv

:0
| formail -I "Subject: @@NCM" | procmail $PMDIR/rc.nocem-e
===================================================================

Thanks in advance

--
Gerben Wierda,

Stafmedewerker Adviesraad voor het Wetenschaps- en Technologiebeleid.
Staff member Advisory Council for Science and Technology Policy
Javastraat 42, 2585 AP, 's-Gravenhage, The Hague, The Netherlands
Tel (+31) 70 3639922    Fax (+31) 70 3608992
http://www.AWT.nl/

"One foolish wise man can state more
        than a thousand wise fools can question."
"Doubters need to understand believes.
        Believers need not understand doubt."

<Prev in Thread] Current Thread [Next in Thread>
  • Why doesn't this work? (setting variables), Gerben Wierda <=