Bug#344410: procmail: add a way to change env. var. on cmd line

2006-01-20 Thread xavier
On Thu, Dec 22, 2005 at 09:14:43PM +0100, Santiago Vila wrote:
 On Thu, 22 Dec 2005, xavier wrote:
 
  the problem is that i'm trying to set VERBOSE and LOGFILE,
  so i can't use -m
 
 You can set VERBOSE and LOGFILE on the command line.
 What problem do you have with that?
 
 Sample .procmailrc:
 
 :0:
 everything
 
 When I do this:
 
 $ procmail .procmailrc VERBOSE=on LOGFILE=`tty`  /tmp/mensaje
 
 I see something like this:
 
 procmail: [19466] Thu Dec 22 21:10:07 2005
 procmail: Assigning LOGFILE=/dev/tty6
 procmail: Opening /dev/tty6
 procmail: Rcfile: /home/user/.procmailrc
 procmail: Assigning MAILDIR=/home/user
 [...]
 
 
 Of course, if you set VERBOSE in .procmailrc itself, it will set a
 value for such variable, and whatever value you gave on the command
 line will be forgotten from that point,


yes, and LOGFILE too. very annoying to test.



 but that's how it is supposed
 to work.


i don't agree. what's the point discarding env var we painfully added on the 
command line ?
in what case would it be useful to wipe environnement ?

what's the point of starting a debug session in `tty` if it's to be overriden 5 
lines later
by the config file ? (which is right to set the verbose to off and logfile to 
something fine :
it's a production setup. cmd line is, in this case, used to debug..)

usually, command line switches overrides config files...
so does env. var.

anyway, you can close the bug if you don't agree.

bye
thanks for your answers.


-- 
xavier 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#344410: procmail: add a way to change env. var. on cmd line

2005-12-22 Thread xavier renaut
Package: procmail
Version: 3.22-11
Severity: wishlist



from the man page :

any default values will override any preexisting environment variables,
i.e., procmail will not pay any attention to any predefined
 environment variables, it will happily overwrite them with its own defaults

So, it wipes anything we try to set.
we use the -p to Preserve any old environment, and it wipes it...

it would be usefull to preserve the env var :

procmail ~/.procmailrc VERBOSE=on LOGFILE=`tty`   
/tmp/test/cur/1134493055.32704_1294.pecos:2,S

that would be nice if there was a way to divert values from the default,
to test.

thanks


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (600, 'unstable'), (549, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-686
Locale: LANG=C, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages procmail depends on:
ii  libc6 2.3.5-8GNU C Library: Shared libraries an

Versions of packages procmail recommends:
ii  exim4-daemon-heavy [mail-tran 4.54-1 exim MTA (v4) daemon with extended
ii  fetchmail 6.2.5-18   SSL enabled POP3, APOP, IMAP mail 

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#344410: acknowledged by developer (Re: Bug#344410: procmail: add a way to change env. var. on cmd line)

2005-12-22 Thread xavier
  So, it wipes anything we try to set.
  we use the -p to Preserve any old environment, and it wipes it...
  
  it would be usefull to preserve the env var :
  
  procmail ~/.procmailrc VERBOSE=on LOGFILE=`tty`  /tmp/[...]
  
  that would be nice if there was a way to divert values from the default,
  to test.
 
 Have you tried using both -p and -m? From the manpage:
 
   If both -p and -m are specified, the list of preset environment
   variables shrinks to just: LOGNAME, HOME, SHELL, ORGMAIL and MAILDIR.

the problem is that i'm trying to set VERBOSE and LOGFILE,
so i can't use -m

 
 If that's still not enough you could even use something like this
 in your .procmailrc file:
 
 :0
 * MYMAILDIR ?? .
 { MAILDIR=$MYMAILDIR }
 
 and this on the command line:
 
 procmail MYMAILDIR=foo  some-message
 
 
 So I don't think we need a new procmail feature for this.




ok, so i could do



VERBOSE=off

:0 
* MYVERBOSE ?? . 
{ VERBOSE=$MYVERBOSE } 

and call procmail MYVERBOSE=on  some-message 

right ?

but all that is a workaround to set env var on the command line...

i believe overriding env. var. with values in the rc file
is wrong, if you specify them on the command line, it means
that you want to change it, right ?

in what case, if you call procmail with the -p option,
would you like your env. var. wiped ? 

in every other tools the command line switchs and env. var.
have precedence over the config file...



thanks


-- 
xavier 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#344410: procmail: add a way to change env. var. on cmd line

2005-12-22 Thread Santiago Vila
On Thu, 22 Dec 2005, xavier wrote:

 the problem is that i'm trying to set VERBOSE and LOGFILE,
 so i can't use -m

You can set VERBOSE and LOGFILE on the command line.
What problem do you have with that?

Sample .procmailrc:

:0:
everything

When I do this:

$ procmail .procmailrc VERBOSE=on LOGFILE=`tty`  /tmp/mensaje

I see something like this:

procmail: [19466] Thu Dec 22 21:10:07 2005
procmail: Assigning LOGFILE=/dev/tty6
procmail: Opening /dev/tty6
procmail: Rcfile: /home/user/.procmailrc
procmail: Assigning MAILDIR=/home/user
[...]


Of course, if you set VERBOSE in .procmailrc itself, it will set a
value for such variable, and whatever value you gave on the command
line will be forgotten from that point, but that's how it is supposed
to work. A .procmailrc file is not a Makefile.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]