Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!kodak!atexnet!lawrence From: lawrence@epps.kodak.com (Scott Lawrence) Newsgroups: comp.mail.mh Subject: Re: xbiff with automagic-incing Keywords: xbiff mh slocal mailnotice notice Message-ID: <5057@atexnet.UUCP> Date: 30 Oct 90 14:34:10 GMT References: <1736@exodus.Eng.Sun.COM> <9010261417.AA21847@rodan.acs.syr.edu> Sender: news@atexnet.UUCP Reply-To: lawrence@epps.kodak.com Organization: Electronic Pre-Press Systems, a Kodak company Lines: 52 In article <72800001@uxa.cso.uiuc.edu>, mark@uxa.cso.uiuc.edu writes: > > Anyone out there care to share with me how you would use xbiff to > monitor ~/mail/mh/1, to consider it true? If the file dne, my xbiff > breaks down and never shows up (I guess it wants a file of length 0??) > I have the following in my .maildelivery: default - | A /usr/local/lib/mh/rcvstore * - | R /usr/local/lib/mh/mailnotice the first causes the auto-inc, of course; the second line triggers my mail notification script, which is appended below. It sends a zephyr notice and adds a line to a .biff file in my home directory (and at the same time removes any from previous days to keep the file from growing forever). Then I use "xbiff -file .biff". mailnotice: #!/bin/sh # # This script expects stdin to be a mail message # # Send a zephyr notice Class: MAIL Instance: MH Destination: $USER # awk '/From:/ {print}; /Subject:/ {print} /^$/ {exit}' - | /usr/local/bin/zwrite -n -s "" -c MAIL -i MH $USER # # If a .biff file exists, add a line to it; # this can be used by: xbiff -file .biff # to change the state of the biff icon # # All the fancy stuff with the date is intended to keep the file from # growing without limit - the date is added to the file, and then any # dates not todays date are removed. # if [ -f $HOME/.biff ]; then date +%y%m%d%t%T | cat $HOME/.biff - | \ awk '$1==TODAY {print}' TODAY=`date +%y%m%d` > $HOME/.biff fi exit 0 --- Scott Lawrence Internet: Voice: 508-670-4023 Fax: 508-670-4033 Electronic Pre-Press Systems; 165 Lexington St. 400/165L; Billerica MA 01821 -- --- Scott Lawrence Internet: Voice: 508-670-4023 Fax: 508-670-4033 Electronic Pre-Press Systems; 165 Lexington St. 400/165L; Billerica MA 01821