procmail
[Top] [All Lists]

Re: LOGFILE

1998-03-03 11:44:09
Terry Todd asked,

| Is there a way to have procmail store the "From: " line in the LOGFILE
| instead of the "From " line?

If you are willing to accept both the From: line *and* the From_ line in the
log, then there's an easy answer (note the use of apostrophes, NOT backticks):

   TRAP='formail -XFrom:'

If you want to avoid the extra system call and don't need $MATCH for
anything else, you can do this too (the last line is my own for
archiving).

   :0 c:
   * ^From:\/.*
   Mail/archives/$DATE.in

Your logfile will look like this (if you have verbose logging enabled):

   procmail: Assigning "MATCH="
   procmail: Matched " Christopher Lindsey 
<lindsey(_at_)ncsa(_dot_)uiuc(_dot_)edu>"
   procmail: Match on "^From:\/.*"

If you don't have verbose logging, do this:

   :0 c:
   * ^From:\/.*
   Mail/archives/$DATE.in

   LOG="From: $MATCH"

Chris

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