procmail
[Top] [All Lists]

Re: LOG & LOGABSTRACT question

2001-02-19 14:26:14
On 19 Feb, David W. Tamkin wrote:
|[...]
| You're right, Dallman: my post was incorrect.  I just tried it again with
| 3.15. Seems that, though I read the procmailrc(5) man page to say otherwise,
| LOGABSTRACT=off is the default.
| 
| I tried these tests from the shell prompt, so that stderr would be connected
| to my terminal.  The following spat logabstracts at me:
| 
|  formail -s procmail DEFAULT=/dev/null LOGABSTRACT=on /dev/null < mailbox
| 
| The following operated silently:
| 
|  formail -s procmail DEFAULT=/dev/null /dev/null < mailbox

I really don't like quarreling with David, and the usual caveats about
me possibly missing something apply, but...

$ cat testrc.0
# testrc
PMDIR=$HOME/.procmail/test
LOGFILE=$PMDIR/pmtestlog
NL="
"
NUM=1
INCLUDERC=$PMDIR/testrc.do
:0 c:
* ^^From support(_at_)vmware(_dot_)com
$PMDIR/mbox.$NUM

:0
/dev/null

 $ diff testrc.0 testrc.1 
8c8,9
< NUM=1
---
NUM=2
LOGABSTRACT=no
status 1

$ cat testrc.do 
# pmtestrc.do
LOG="${NL}LOG Write Test# $NUM: "
LOG="LOGABSTRACT=${LOGABSTRACT:-unset} VERBOSE=${VERBOSE:-unset}$NL"
LOG="                   Is there an abstract?$NL"

$ procmail ./testrc.0 <../RegInfo 
$ procmail ./testrc.1 <../RegInfo 
$ cat pmtestlog 

LOG Write Test# 1: LOGABSTRACT=unset VERBOSE=unset
                   Is there an abstract?
From support(_at_)vmware(_dot_)com  Tue Sep 12 21:08:24 2000
 Subject: VMware Customer Profile Update Acknowledgement
  Folder: /dev/null                                       1620

LOG Write Test# 2: LOGABSTRACT=no VERBOSE=unset
                   Is there an abstract?

[end of log - Folder: line shortened above.]

That looks to me as though LOGABSTRACT is set true by default, as David
thought at first. And in case it is (surprisingly?) version dependent,
this is with v3.13.1.

|| But I believe that (under 3.11pre7) if I don't specifically turn on the
|| abstracting, my directives to "LOG="whatever $NL" don't show up.
| 
| I gather you meant that if you don't specifically turn on the abstracting,
| the logabstracts don't show up, and that's what I was testing up above.  But
| to take your wording literally, no, assignments of the LOG variable still are
| written to stderr.  If you don't define a logfile, stderr is probably going
| into the bit bucket, but if stderr is going somewhere visible you don't need
| to turn abstracts on to see LOG= assignments.
|
| The following gladly wrote "This is silly." to my screen once for each
| message (provided that I used extra quotes around the newline) without need
| to set LOGABSTRACT:
| 
|  formail -s procmail DEFAULT=/dev/null LOG="This is silly.'
| '" /dev/null < mailbox
| 
| and specifically including LOGABSTRACT=off didn't change that: the comments
| were still written to my terminal.

At first I ran a longer set of tests than shown above (which was the 
reason for the separate INCLUDERC) but didn't include them since they
don't show anything more. But every LOG= assignment resulted in a
logfile write irrespective of LOGABSTRACT or VERBOSE settings (and
logging of abstracts was also independent of the value of VERBOSE,
though I don't think that was in question). That was true of every
possible combination of values for the two variables, which I think
agrees with David's position here. It also agrees with my (possibly
fuzzy) recollection of earlier versions of procmail back to about 3.10.
Redoing the test from above using LOGABSTRACT=all and unsetting LOGFILE
(and with VERBOSE still unset) resulted in the 2 LOG= writes and 2
abstracts going to the console, also the same as David reports.

-- 
 /"\                                                 Don Hammond
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL,
 / \      AND NEWS TOO

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

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