[Mimedefang] LDAP lookup in each function or write the LDAP results to the spool?
Matthew Schumacher
matt.s at aptalaska.net
Thu Oct 5 00:56:09 EDT 2006
John (and others),
I completely agree that ramdisk access is a lot cheaper than mysql or
some other form of DB, but I'm not sure about LDAP. It's pretty fast:
/usr/bin/time ldapsearch uid=user > /dev/null
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+373minor)pagefaults 0swaps
Anyway, I do want to look at doing it the ramdisk way, so I'm wondering
which file it should go into, and if there are already internal
methods/functions in mimedefang that will let me read my data back out
without writing a parser.
David, if this isn't already done, perhaps a function/method to
serialize a hash to a spool file and back would be very handy and global
enough in scope to be useful for many more applications than this.
Perhaps you would entertain this going into a future release?
Thanks,
schu
John Scully wrote:
> generally speaking, if your working dirs are on ramdisk it is pretty
> light load to write files there. We use a mysql based mail platform and
> cache information to the working dir to reduce multiple DB hits.
>
> When in the RCPT phase we hit the DB to see if it is a valid recipient
> etc. This DB dip also returns the spam settings for that user, which we
> write (append) to a file in the mimedefang working dir.
>
> Then, if there were any valid recipients we hit DCC, greylist,
> spamassassin etc, score the message, read the spam_settings file back in
> and process it for each user as per their individual settings.
>
> There may be lower overhead solutions, but this is pretty light, and
> easy to implement and debug.
>
> John
More information about the MIMEDefang
mailing list