procmail
[Top] [All Lists]

Re: Procmail and indexing

1998-03-11 18:46:21
I've been looking for an indexing program that is either (a) targeted at
mail indexing, or (b) allows the user to flexibly define the structure of
documents.  My goal is to be able to restrict searches to specific
headers; something along the lines of:

   (SUBJECT "procmail" and FROM "lars") or BODY "index"

Well, you could just convert this to glimpse:

   glimpse -i '{Subject:#procmail;From:#lars},index'

Unfortunately, when I test it on my mailboxes, it complains that the
regex is > 32 characters (which the man page says shouldn't matter
unless I use '-d').  Ah well.  If it works for you, great!  If not,
chalk it up to another glimpse bug.  You could also try using the
SOIF format to use attributes with glimpse/glimpseindex -- haven't
tried it, but it sounds like it might do the trick.

Why not create a simple SQL database instead?  mySQL works quite nicely
-- you could make a table with each column containing a header (and the
last column containing the message body).

You could easily use formail to extract whatever headers you wanted,
or just use a quick perl script.

The only potential problem is the size of the database.  Messages with
large attachments or mail bombs could cause problems unless you prepare
for them.

The URL for mySQL is

   http://www.tcx.se/

It's free and supports multi-threading.

Chris

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