I am attempting to filter mail by removing a certain portion of the body
of a message if it contains certain text... I am having a problem with
what I believe to be my inability to understand the difference between
'delivering recipes' and 'non-delivering recipes'. I have found a
workaround but I would really rather understand where I've gone
wrong.
-------------------------
Here is my .procmailrc file:
#set on when debugging
VERBOSE=off
#VERBOSE=on
#place to store folders
MAILDIR=$HOME/.mail
#Directory for storing procmail log and
#rc files
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/mail_log
INCLUDERC=$PMDIR/rc.mailrules
-------------------------------------
Here is my rc.mailrules file:
:0:
*^From:.*postmaster
IN.mailprob
:0:
*^To:.*root
IN.root
:0 B:
*beginning.*of.*open.*letter
*end.*of.*open.*letter
|/apps/local/bin/noletter >> IN.letter
:0 E:
*^Subject:.*open.*letter
IN.letter
:0 B:
*beginning.*of.*open.*letter
*end.*of.*open.*letter
/dev/null
-----------------------------------
noletter.c is a simple 'C' program which
filters text. The problem I am having if
I omit the last recipe is that the mail with
filtered body goes to IN.letter alright but a
copy of the original message if it matches
the third recipe was getting passed to my default
mail file necessitating the fifth recipe. What am
I doing wrong? Is it obvious?
Martin Thompson
thompson(_at_)cu48(_dot_)crl(_dot_)aecl(_dot_)ca