procmail
[Top] [All Lists]

Re: or'd condition versus checking against a list

2003-08-16 11:35:07
On Sat, 16 Aug 2003 10:46:07 -0700 Professional Software Engineering 
<PSE-L(_at_)mail(_dot_)professional(_dot_)org> wrote:

At 08:52 2003-08-16 -0400, Doug Essinger-Hileman wrote:

I am now beginning to get quite a long list of requested commercial
catalogs, and am wondering if it is more efficient to continue to use
this condition expanded to include all the possibilities (my example
is shortened for brevity), or to shift to checking an external list,
similar to checking my whitelist for mail from people I know and
trust.

A long list internal to tbe procmail script will be more efficient than 
having procmail invoke a program (and possibly a shell as well) which
must 
open and read another file to check a list.

OTOH, it is a hell of a lot more convenient to manage an external file.

You could always take the recipes and put them in separate files to
include 
into a sandbox (see my .sig), and then throw a LARGE sample mailbox at 
them, wrapped in time:

         time formail -s procmail -m sandbox.rc < bigmailbox

you might want to run it a few times so that the mailbox is sufficiently 
cached and then you'll be able to ignore timing differences between the 
first run (which has to actually read the mailbox from disk) and
subsequent 
runs (which may be making use of cache).

---
  Sean B. Straw / Professional Software Engineering

You could also use a "NOT-NOT From" recipe in a separate includerc'd file
and time that also. I have no idea where I originally found the idea and
I'll be danged if I could locate it in the man pages but here's the idea as
I use it for Ebay email:

#Ebay
:0
* ! ^From(_dot_)*listingconfirm(_at_)ebay(_dot_)com
* ! ^From(_dot_)*endofauction(_at_)ebay(_dot_)com
* ! ^From(_dot_)*bidconfirm(_at_)ebay(_dot_)com
* ! ^From(_dot_)*personaloffer(_at_)ebay(_dot_)com
* ! ^From(_dot_)*endoftransaction(_at_)ebay(_dot_)com
* ! ^From(_dot_)*aw-confirm(_at_)ebay(_dot_)com
* ! ^From(_dot_)*dailystatus(_at_)ebay(_dot_)com
* ! ^From(_dot_)*rovatron(_at_)esnipe(_dot_)com
{ }
:0 E:
.Ebay/

The recipe tests each message to see if is NOT from the specified address.
If it *IS* from one of the addresses (NOT-NOT From) it generates a failure,
skips the rest of the tests, and delivers because of the "on-error"
delivery condition.

You could probably set it up using your OR list broken down into groups of
5 or so per OR condition line to gain some speed.

Gerald

-- 
Gerald V. Livingston II

Configure your Email to send TEXT ONLY -- See the following page:
http://expita.com/nomime.html

'74 Kombi (to be renamed - LifeSaver doesn't 'feel' right)
'69 Type 1 - AirBall the Rolling Basket Case
http://www.phorce1.com
http://www.buskatiers.org


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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