procmail
[Top] [All Lists]

Re: Simplyfying my 'mailinglists.rc'

1998-02-14 11:27:34
On Fri, 13 Feb 1998 20:51:59 -0500 (EST), erik selke
<selke(_at_)tcimet(_dot_)net> wrote:
<... On ORing conditions ...>
I believe if you change it to something along the lines of:
     :0:
     * 1^0 ^From.*nasa.gov
     * 1^0 ^TOssrt-news
     * 1^0 ^TOJPLNews
     * 1^0 ^FROM.*NASANews
     00-Space

it will work - I could be wrong tho - if there is a better/more efficient
way of doing this, I'd be interested in knowing as well

I haven't measured this, but allegedly the scoring system is going to
cost you more than plain old regex matching. (Floating-point math and
all that, even if you use extremely simple scoring, as you do above.)
Thus, it would probably be slightly more efficient to do this instead:

    :0
    * ! ^From.*nasa\.gov
    * ! ^TO(ssrt-news|JPLNews)
    * ! ^From.*NASANews
    { } # do nothing

    :0E: # else save to 00-Space
    00-Space

Hope this helps,

/* era */

(Is | alternation more costly than two separate regexes? Hardly with
^TO which contains a lot of alternation in itself already?)

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>