procmail
[Top] [All Lists]

Re: Procmail patch to avoid growing humungous log files with VERBOSE=on

1997-08-13 11:42:00
-----BEGIN PGP SIGNED MESSAGE-----

Thanks for asking.

VERBOSEMATCH only logs the matches, whereas VERBOSEMATCHONLY is meant
to be used in conjunction with VERBOSE so that all non-matching
matching type messages are not logged (e.g, no match (yes, there is
some other type of matching message besides match & no match, I forget
what it is right now)).  I'm too tired to make that any less concise.
Sorry about the poor documentation; I wrote it in a frenzy, when
each mail brought in half a meg of logging.

My other patch to ProcMail is a hack -- I set "rawnonl=1" everywhere
everywhere everywhere!  I use MH and have absolutely no use for the
extra newline, and as a matter of fact am religiously opposed to it.
When I found it it pissed me off so much I didn't care whether I kept
backwards compatability, so I never posted it, but here it is anyway.
That seems like a harder patch for me to understand than the verbose
thing.  But here is a clue:

ulmo(_at_)Q:/usr/src/redhat/SOURCES/procmail/procmail-3.11pre7/src$ egrep 
rawnonl *.c
mailfold.c:int logopened,tofile,rawnonl=1;
mailfold.c:     part=tofile==to_FOLDER&&!rawnonl?getchunk(s,source,len):len;
mailfold.c:     if(!rawnonl)
mailfold.c:     if(!rawnonl)
mailfold.c:     tofile=strcmp(devnull,buf)?to_FOLDER:(rawnonl=1,0);
pipes.c:     rawnonl=1;                                /* give back the raw 
contents */
procmail.c:              
rawnonl=1/*flags[RAW_NONL]*/;inittmout(buf);asgnlastf=1;
procmail.c:tostdout:     strcpy(buf2,buf);rawnonl=/*flags[RAW_NONL]*/1;
procmail.c:setlsucc:     rawnonl=/*0*/1;
procmail.c:      { rawnonl=/*0*/1;
procmail.c:mailed: rawnonl=/*0*/1,retval=EXIT_SUCCESS;    /* we're home free, 
mail delivered */
ulmo(_at_)Q:/usr/src/redhat/SOURCES/procmail/procmail-3.11pre7/src$

Question, though: how is it used?  I get the feeling that VERBOSEMATCH and
VERBOSEMATCHONLY are Booleans, but what *exactly* do they do?  (I can make
guesses, but I don't want to rely on guesswork.)  There was talk of a func-
tion to make the log verbose only for reporting matches and not for reporting
"No match", but surely that feature would require only one new variable;
there are two introduced here.

[my VERBOSEMATCH/VERBOSEMATCHONLY patch ...]

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQEVAwUBM/H8nZxWhFYc6x9VAQGySAf/a/V8c9UHNx1zgrDT9TigPT1dA9TaLobG
xk+5b5X8Y7Yz+mlbh+NAgqXtfdEE2gmZtYEpOTA7GFdiovTqyZ1M0du2iza216FF
ILb+/fDjP4EFRGzITz4PoXwExK5cqsXCcHDrOKmt5bY/ieflx3uVGAd8Y4aIXoBR
EHr5ruIcu49MO0egokVSDrbILY9Ykh60SVAbID9r8zD4Mi5xh6plFOdZN0ocuwvX
pnaoLq2MF/RMfIA/zuMZEJj2IfFdX5x2sGPb2AZx8rL0N6XVJnSgdd8HQ+k/2Xga
nmTnCui1T6cKc6zHZhtP9vEXDnr+y9/ckdhVqmV+dXonyH16TmjtaQ==
=Pitu
-----END PGP SIGNATURE-----