procmail
[Top] [All Lists]

Recurring Non-changing Email : Filter

1999-01-07 09:38:48

I have a series of 4 reports that are sent to me daily by a 
software configuration control system.  Essentially it is a 
summary of all the CRs (change requests) and release requests
for our software.

The problem is that the reports rarely change.  The sending 
program is not smart enough to only send it to me when it changes,
so I'd like to write a procmail filter to do a diff for me.

The email comes with a standard subject each time:

Subject: Daily uard Continuus/PT SW Mgr Report

Obviously the headers will be different so what I need to do
is extract the body to a file then do a diff.  If there are
differences, then forward the message as appropriate - but if
it is the same as the last one that was sent, I need to send
it to /dev/null.

Here was my first thought but I'm stuck as you will see:


:0
* ^Subject:.*Daily uard
{
  :0 b
  | cat >! /tmp/uardmsg ; <diff here>


but I dont know how to get the result of the diff into a variable
so I can check to see if it is a 0 (diff returns 0 on no difference)

Can someone help me here - or at least give me some clues on
how to proceed?  

toddl


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