procmail
[Top] [All Lists]

Re: Rejecting multiple names/subjects at once?

1996-07-05 13:51:33
On Mon, 10 Jun 1996 08:11:56 -0700, "Alan Stebbens 
<stebbens(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com>" 
<stebbens(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com> said:

   # This recipe filters FROM through the badaddrs file, if egrep succeeds,
   # then we don't want this mail, and we'll bounce it
   :0E
   * ? echo "$FROM" | egrep -f $BADADDRS
   { BOUNCE=1 }

I usually get the error "egrep: regular expression too long" when I
run the above command.  This is on SunOS 4.1.  Here's how to reproduce
it:

--- file junkfile.data: ---
u1(_at_)alpha(_dot_)beta(_dot_)gamma
u2(_at_)delta(_dot_)epsilon
u3(_at_)foo(_dot_)bar(_dot_)baz
u4(_at_)plugh(_dot_)plover
u5(_at_)xyzzy(_dot_)com
u6(_at_)frobozz(_dot_)magic-wells(_dot_)com
mrose.stsci.edu
--- end file ---

The command is:

   echo "mrose(_at_)stsci(_dot_)edu" |egrep -f junkfile.data

If I change the last line of the file from "mrose.stsci.edu" to
"mrose(_at_)stsci(_dot_)edu", then the command works correctly.  That's not a
solution, just a boundary.

Does anyone have any suggestions how to make this work?  It would be
very convenient to be able to put a bunch of regexp's in a file and
match for junk mail (and other things) against each line in the file.

Thanks,

Mike Rose

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