The first condition was just my way of making the recipe find messages with
*multiple* To: lines. The initial score of -1 made the first To: header set
the score to 0, keeping the recipe from immediately matching. Details,
details... :)
jcl
"ee" == era eriksson <era(_at_)iki(_dot_)fi> writes:
ee> On Wed, 12 May 1999 08:39:01 -0400 (EDT), Justin Lloyd
ee> <jlloyd(_at_)harris(_dot_)com> wrote:
How about this for reporting more than 1 To: line? (code is untested)
ee> Just as a reminder, these things +are+ rather easy to test.
ee> $ cat <<'HERE' >/tmp/foo.rc
:0
* 0^-1
* 1^1 ^To:
{ LOG = "There were $= To: lines" }
HERE
ee> $ procmail DEFAULT=/dev/null SHELL=/bin/sh /tmp/foo.rc <<HERE
To: one
To: too
From: me
To: you
HERE
ee> There were 3 To: lines
ee> Unsurprisingly, this works. It's not clear to me what good the first
ee> condition does, though.
ee> $ cat <<'HERE' >/tmp/bar.rc
:0
* 1^1 ^To:
{ LOG = "There were $= To: lines" }
HERE
ee> $ procmail DEFAULT=/dev/null SHELL=/bin/sh /tmp/bar.rc <<HERE
To: one
To: too
From: me
To: you
HERE
ee> There were 3 To: lines
ee> Hope this helps,
ee> /* era */
ee> Remember to clean up after yourself, too.
ee> $ rm /tmp/foo.rc /tmp/bar.rc
ee> --
ee> .obBotBait: It shouldn't even matter whether <http://www.iki.fi/era/>
ee> I am a resident of the state of Washington.
<http://members.xoom.com/procmail/>
ee> * Sign the European spam petition!
<http://www.politik-digital.de/spam/en/> *
--
Justin C. Lloyd Harris Corporation, ISD Voice 407/984-5558
jlloyd(_at_)harris(_dot_)com 505 John Rodes Blvd. Fax
407/984-6323
Unix System Administrator Melbourne, FL 32935 Office W3/1804b
"A standard doesn't have to be good, it just has to be good enough. The fact
that it is a standard more than makes up the difference." -- jwz