procmail
[Top] [All Lists]

procmail scalability concerns

1996-06-07 18:13:45
Greatings procmailers,

    I'm looking at using procmail for a particular project and am a bit
    concerned about its scalability.  I think that given my application,
    this is *not* likely to be a problem, but your thoughts on the subject 
    would be appreciated.

    We have a mail account that gets about 20 submissions a day from people
    submitting stuff to go in our web pages.  A human handles it all right
    now.  I want to start splitting off some of this flow.  In particular 
    the MIS department is creating reports using batch jobs so the format
    of the mail message notification is very predictable.  

    I would have those jobs send to an alias which would be pointed to this
    account. So, that would mean a .procmailrc file that looks for a
    certain "To:" address, and if it matches that alias, we then would 
    execute a certain script based upon the from and subject fields. For
    example:

    +------------------------------------------------------------------
    | ... symbol assignments ...
    |
    |  :0
    |  * ^To: unhinfo(_dot_)mailbot(_at_)unh(_dot_)edu
    |  * !^X-Loop: *unhinfo(_at_)unh(_dot_)edu
    |  * !^Subject: *Re:
    |  * !^FROM_DAEMON
    |  {
    |      :0
    |      * ^From:.*(D_MORAN|L_LEE)@unh[ef].unh.edu
    |      {
    |          :0
    |          * ^Subject:.*some-string
    |          | do this script
    |  
    |          :0
    |          * ^Subject:.*some-string
    |          | do this script
    |               :
    |               :
    |      }
    |  
    |      :0
    |      the next set of addresses and subjects, etc....
    |  
    |      otherwise send back a message that this is not a recognized
    |      request
    |  }
    |  

    Over time I anticipate a max of a few hundred of sub-recipes -- all
    within that one and only recipe that catches that particular address.

    My question is, do I have to worry about the performance of procmail
    in a situation like this?  My alternative would be to call a Perl
    script on that one "To" recipe and not wait for it.  The Perl script
    could then take its time parsing things.  An advantage of the Perl
    script would also be the ability to use a simpler, specialized rule
    database, i.e. a file that just contains:

           address, subject, script-to-run-with-params
           address, subject, script-to-run-with-params
           address, subject, script-to-run-with-params
           address, subject, script-to-run-with-params
           address, subject, script-to-run-with-params

    This would be a bit easier for inexperienced staff to maintain. Of
    course implementing the Perl script will take much longer than the
    above procmail implementation - but it is something I know I can do.

    So bottom line, am I being silly to worry about the time procmail will
    spend chewing on these recipes?  After all, even if it takes a moment
    or two, what could possibly go wrong? ;^)

                                                        Later....BC

##    ##    ##    ## +----------------------------[ 
Bill(_dot_)Costa(_at_)UNH(_dot_)EDU ]---+
##    ###   ##    ## | Bill Costa                                          |
##    ####  ##    ## | CIS - Kingsbury Hall                                |
##    ## ## ######## | 33 College Road              PHONE: +1-603-862-3056 |
##    ##  ####    ## | University of New Hampshire    FAX: +1-603-862-4778 |
##    ##   ###    ## | Durham, NH  03824-3591  USA                         |
 #######    ##    ## +----------------[ No good deed goes un-punished. ]---+

<Prev in Thread] Current Thread [Next in Thread>
  • procmail scalability concerns, Bill Costa - NIS/CIS - University of New Hampshire <=