procmail
[Top] [All Lists]

Re: mucking with $LASTFOLDER

1997-09-18 09:51:18
On Thu, 18 Sep 97 11:00:07 -0400, Timothy J Luoma <luomat(_at_)peak(_dot_)org>
wrote:
Depending on what you want it for (logging?), you could do
something in TRAP:
TRAP='echo $LASTFOLDER | sed -e "s/appnmail //" >&2'
Hrm... that seems to work on its own, but I can't seem to make it work with  
the rest of the TRAP command I already use for my logging:
TRAP="echo '
FROM    $FROM
TO/CC   $TO / $CC
SUBJECT $SUBJECT
"'
   ^^
Is this actually what you have in your .procmailrc? Looks backward.

I wanted to add the LASTFOLDER line as the last line in the TRAP.

Then how's this:

TRAP="echo '
FROM    $FROM
TO/CC   $TO / $CC
SUBJECT $SUBJECT
FOLDER  $LASTFOLDER
' | sed -e 's/^FOLDER   appnmail //"

Hope this helps,

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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