procmail
[Top] [All Lists]

Re: running "Side effect" shell commands

1998-02-05 00:42:07
Wed 98-02-04 era eriksson <era(_at_)iki(_dot_)fi> list.procmail
| On 04 Feb 1998 11:49:14 +0200, <jari(_dot_)aalto(_at_)poboxes(_dot_)com> 
wrote:
|  > The reason I was asking, was that when I was about to drop a message to
|  > a folder I wanted to write a message to my Emacs biff log too.
| 
| If that's all you want, why not log it from TRAP?
| 
|     TRAP='echo "folder: $LASTFOLDER" >>$biff'

Yup, TRAP woudl be fine but in my case not all drops are logged(mailing lists)
and I attach additional lines from the message when dropping to folder
(like from work NOK case reports).

| I'm not sure how having a separate log file is better than using the
| log Procmail is already writing for you. 

Eh, Era, you know how much cruft is written to procmail log.
It serves its purpose for debugging. The biff log (tail -f process) that I'm
running in Emacs window looks like this (with colors that you don't see
here):

1998-02-04 delver(_at_)company(_dot_)fi  T10 SYTE: NOK state report
    Fault: E012638 dbrmui: Multiple Managed Objects cannot be removed
    [my; work-nok]
1998-02-04 omcman(_at_)company(_dot_)fi  "T10 CM Local Environments updated"
    [my; work-localenv]
1998-02-05 34598712(_at_)msn(_dot_)com  ALERT - Internet Fraud and Spying
    [jaube; MessageId;  ALERT - Internet Fraud and Spying]
1998-02-05 world_report(_at_)list(_dot_)geocities(_dot_)com  The GeoCities 
World Report
    [my; null; GeoCities World Report <world_report]


Cheers!
jari