[Mimedefang] LDAP lookup in each function or write the LDAP results to the spool?

Matthew Schumacher matt.s at aptalaska.net
Wed Oct 4 18:25:35 EDT 2006


List,

My mail system is getting pretty complex, we have all sorts of features
and options and they are all controlled by ldap attributes.  Well, as
you all know, the ldap record can't be saved between functions as
mimedefang may not use the same child for the next milter call.  Because
of this I'm doing a LDAP lookup in almost every filter function, for a
total of 4 lookups per message.

At this point it seems kinda redundant to me so I started looking at
other ways to reduce the amount of ldap queries, but the only thing that
comes to mind is to write the attributes to a LDAP file in the spool
then look at it instead of sending more queries to the LDAP server.  It
seems to me that opening/parsing/closing a file (even on a ramsdisk) is
going to be more expensive because my ldap server does cache the data,
and because the directory fits in memory, but I'm unsure.

Any thoughts on this?  Anyone else run into this and do some
benchmarking?  Perhaps it's a wash, but it's something to think about.

schu




More information about the MIMEDefang mailing list