On 15:37 05 Mar 2002, David T-G <[EMAIL PROTECTED]> wrote:
| % On 17:15 02 Mar 2002, christophe barb? <[EMAIL PROTECTED]> wrote:
| % | It seems there is no option to avoid the use of the access time.
| ...
| % Instead, I have my procmail recipe write a line to a log file when
| % interesting email arrives (i.e. only when one of a few recipes fires).
| % And I have a small window which tails that logfile. If I were in text mode I
| % could just tail that log in the background.
|
| I like this, and I've been looking for something this simple. Can you
| post or send your config for me to blatantly copy? :-)
Sure. Here's an example recipe:
: 0
* ^(to|cc|bcc):.*cs@zip\.com\.au
{
: 0hc
| mhdrs | { while read hdr body; do eval "HDR_$hdr=\$body"; done; alert -c
yellow "`timecode` +attn $HDR_FROM; $HDR_SUBJECT"; }
:0 whf
| formail -A "X-Label: Personal"
: 0w
| /usr/lib/nmh/rcvstore +attn -unseen
}
This catches email "to me".
The internal part does 3 things: writes the logfile line, tags the message
with an X-Label header, and drops in into my "Attention" mailbox with MH.
You want the first bit.
Mhdrs is this script:
http://www.zip.com.au/~cs/scripts/mhdrs
which just recites the message headers in a shell-friendly form. For
example, this message gets:
FROM Cameron Simpson <[EMAIL PROTECTED]>
TO David T-G <[EMAIL PROTECTED]>
CC Mutt Users' List <[EMAIL PROTECTED]>
BCC
SUBJECT Re: procmail log tailing (was "Re: mutt and noatime partitions")
REPLY_TO [EMAIL PROTECTED]
IN_REPLY_TO <[EMAIL PROTECTED]>
and the while loop just picks these up and sets $HDR_FROM, $HDR_TO etc
to match. After the while loop you do whatever you like. Which could
be as simple as:
echo "$HDR_FROM; $HDR_SUBJECT" >>your-log-filename-here
As you can see I pass it to yyet another script, but it's core purpose
it to write it to my "alert" logfile, in yellow.
Then my FVWM setup have a 3 line xterm running what is essentially
"tail -f" of this log file.
--
Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/
This article could be hazardous to your credulity.
- Jim Brown <[EMAIL PROTECTED]>