procmail
[Top] [All Lists]

Procmail Database Interface?

1999-07-12 10:34:32
Hey,

I'm working on a new system for which I need something pretty unusual.  I've
setup sendmail with some wildcarding so that 
anything(_at_)anything(_dot_)domain(_dot_)com
goes through and is sent to one user account.  That user account has
procmail set to run in the .forward file.  Here's the catch, the .procmailrc
file may contain hundreds of thousands of recipes.  While at first the
number may be smaller, it may grow to a very large size.

So I did some testing.  I made a perl script to add these entries.  While
procmail DOES work to handle forwarding for about 2,000,000 addresses in the
.procmailrc file, it takes a VERY long time (understandably).  It may take
over an hour on a Pentium II 300 Mhz system.  In any case, I'm wondering if
there's some workaround for this.  Some thoughts I had were:

        a) Some sort of relational database interface (has this been done?)
        b) A DBM or hash rc file (not sure this would work due to wildcards)
        c) Multiple rc files -- the main rc file would say "go to this rc file 
if
the
                e-mail address begins with "A", go to this one if "B".

Are any of these solutions feasible, or have they been done?  Is there
another way of getting around speed issues?  I have a version of procmail
that was released 1997/04/28, I believe.  Are there newer ones that are
faster.  I couldn't help but notice that the grep tool finds the selected
recipe much faster than procmail does.  Still, procmail has been a lifesaver
and I'd love to stick with it, I just wish there were better interfaces to
the recipes.

Any help would be appreciated,
Thanks,
Russell

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