procmail
[Top] [All Lists]

Re: LOG & LOGABSTRACT question [Was Re: spawning an external app]

2001-02-18 17:50:16
  Basically you have your default procmailrc file, be it /etc/procmailrc or
~/.procmailrc which contains the necessary line, well when you want to
include a particular note in your logfile about whether a particular message
went were it went you can add the LOGABSTRACT=on line to the rule itself.
For example, if you have any rules that send particular messages to
/dev/null you will never know about it if LOGABSRACT is set to no or off, so
for the following rule

    :0
    * BULKTAG ?? yes
    {
       :0
       { LOGABSTRACT=on }

       :0
       ${SPAMDEST}
    }

Which would put a message similar to the following in my logfile
        From tomas(_at_)primenet(_dot_)com  Sat Feb 17 23:59:53 2001
         Subject: spamtest
          Folder: /dev/null         1272

Then on the next message, LOGABSTRACT will be reset to off since it rereads
the .procmailrc for each message. Of course I tend to explain things as I
happen to understand them, so if my explanation above is a bit off, then
please correct me :)

--
        S.Toms - tomas(_at_)primenet(_dot_)com - www.primenet.com/~tomas
                   SuSE Linux v7.0+ - Kernel 2.2.18

Real Users never use the Help key.



----- Original Message -----
From: "Colin J. Raven" <cjraven(_at_)ddf-lab(_dot_)com>
To: "Dallman Ross" <dman(_at_)nomotek(_dot_)com>
Cc: <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>; 
<dman+noacks(_at_)nomotek(_dot_)com>
Sent: Sunday, February 18, 2001 11:00 AM
Subject: Re: LOG & LOGABSTRACT question [Was Re: spawning an external app]


On Sun, 18 Feb 2001, Dallman Ross wrote:

I've never tried this, but can you define on a per-recipe basis
whether to
log not to log? as opposed to per xxxrc file?

Yes, and yes.
Can you cite a simple example of how this might best be accomplished?

As a followup question, does LOGABSTRACT give just a brief synopsis of
the
arrival and handling of a message? and is LOGABSTRACT=on the default
behaviour if a logfile is named?

(That's two follow-up questions, not one.)  No, and no.
Er, yes actually that's true, oops that was a "stream of consciousness"
issue. Sorry! :-)
LOGABSTRACT set on allows you to shunt messages to the logfile
with the
LOG="Your text goes here"
line.  Often people put a newline in the quotes or pre-define a
newline, e.g.,
NL="
"
and then use `$NL' in the log entry to make it nice and readable.

Again, (and I have *always* learned better if I saw an example of whatever
it was/is from this list) can you give an example of how this could be
done?

Regards,
-Colin



_______________________________________________
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>