procmail
[Top] [All Lists]

Re: Procmail efficency? How do I make my .procmailrc more efficient?

1997-11-12 19:45:43
Quoting Scott Anguish (sanguish(_at_)digifix(_dot_)com):
:0:
*  
^TO\/(stepwise-talk-request|rhapsody-nda-request|rhapsody-nda|rhapsody-ui|webobjects|spamtools|rhapsody-dev|modperl|stepwise-talk|rhapsody-talk|next-prog|eof|dilbert_nextmail|omniweb-l|procmail|zsh-users|zsh-announce)
{
      FOLDER=`echo $MATCH | tr 'A-Z' 'a-z'`
      :0
      |appnmail $MAILING_LIST_DIRECTORY/$FOLDER
}


If I seperates out each test I could handle it much better, making sure each  
copy gets put into its place...
but will it be significantly slower?

I'd expect it to be faster. The way you have it now, procmail has to
spawn a shell for echo and tr every time you get a list. It's a lot more
expensive to start a new process than to search a couple of extra
regexp's, especially if you made the expressions simpler: try something
like
   * ^X-Mailing-List: <procmail
instead of ^TOprocmail. (Though it's arguable whether the simpler
version would be noticably fasterc.)

I've already dropped all the BODY searches in my spam filters due to the  
slowness on large emails (maybe I should just test for size before testing  
bodies?)

There's usually a lot more to search through in a body than a header. A
size test would help, but it's still going to be a relatively slow
process. As long as it's stuck on after your mailing list directives it
shouldn't be too bad, but you're just out of luck if you try to body
filter everything you get.

-- 
Michael Stone, Sysadmin, ITRI     PGP: key 1024/76556F95 from mit keyserver,
mstone(_at_)itri(_dot_)loyola(_dot_)edu            finger, or email with 
"Subject: get pgp key"