Subject: Re: Detecting incoming mail in more than one inbox

From: Bodo Randt <[email-masked]>
Date: Fri, 22 Jul 1994 09:28:02 +0100 (WET DST)

I use the filter program for sorting my incoming mail and at each login
an awk program checks the log file of filter and sends me a summary mail
of all mails that were sorted by filter. This gives you enough overview
not to miss any important (interesting) presorted mail.

I assume there is a log file for procmail etc. too.

A small shell script in your .login (for csh) invokes all:

#!/bin/sh
awk -f $HOME/.elm/filter.log.awk $HOME/.elm/filterlog \
| elm -s FilterLog $USER
date > $HOME/.elm/filterlog

---------------------------------------------------------------
The log of filter looks like this:

Mail from [email-masked] about Re: Should we upgrade?
        (addressed to [email-masked])
        SAVED in file "/usr1/users/bodo/mail/pine" by rule #1

Mail from bodo about FilterLog
        PUT in mailbox: the default action
--------------------------------------------------------------

#####################################################################
#  awk-script filter.log.awk ########################################
#
# process the filter log file in ~/.elm/filterlog and mail the result
# to the user

/WET DST/ {
   print $0				# get time interval of log file
}

/^Mail from/ {
   from = $3 
   if ((i=index($0,"about"))>0)
      subject = substr($0,i+6)		# save all subjects      
}

/about/ {
   i=index($0,"about")
   subject = substr($0,i+6)		# subject may be here too
}

/SAVED/ {
   saved ++
   tmp = $4
   i = split(tmp,arr,"/")
   folder =substr(arr[i],1,length(arr[i])-1)	# get folder of applied rule
   print folder "	"  subject
}

#############################################################################

Bodo Randt

_________________________________________________________________________
|                Atlas Elektronik GmbH    D-28305 Bremen                |
| Bodo Randt     Simulation Division      Sebaldsbruecker Heerstr. 235  |
|                                         +49/421/457-3172  -4120 fax   |
|___________     [email-masked]           ______________________________|