[dev] IMP Filters+LDAP

Atif Ghaffar aghaffar@developer.ch
Sun, 04 Mar 2001 16:34:43 +0100


Jon Parise wrote:
> [Revisiting old messages once again]
> 
> > Can we perhaps keep it in multiple filter attrubutes.
> > Something like
> > uid=aghaffar_ispman_net, ou=users, domain=ispman.net, o=ispman
> > filter: 1,something=something&somethingelse=somthing,delete
> 
> Now that we have more attributes in config/prefs.php, perhaps we could
> be even smarter about storing preferences.  In the preference driver's
> restore() and store() methods, we could act different according to the
> preference type.  We could make "filter" as an array and store it
> using the above example in the LDAP driver and perhaps do something
> different in the SQL driver.
> Comments?
Hi Jon.

Thanks for addressing this issue.
I thought horde developers had a filter set on my email address :)
This is the only reply I have got to my inquiry (after almost a month).
I wonder why.. anyway.

For DB: I would suggest to create a separate table for imp_filters
<thinking out loud>
with fields 
id, (auto running index)
username,
filter_id  (number that defines the rank of this filter within the
filters)
criteria (what to match )
action (what to do)
other fields if neccessary.
</thinking out loud>

So this way we will be storing records about filters the same way in
each backend db(LDAP or DB)
the difference will be that LDAP has for each user, sort of a DB
(private storage area: users record), while in Mysql etc, there will be
only one table sharing filters of all users.
something like 
select * from filters where username="aghaffar"
will give a list of user's filters.
and 
ldapsearch uid=aghaffar filters
will also give the same information in a slightly different format.


just some random ideas. 

cheers





-- 
Atif Ghaffar
Internet Development Manager
4unet AG/SA 

-------------------------.
	+41 78 787 51 45 ¦ voice
	+41 24 441 09 03 ¦ fax
    http://www.4unet.net ¦ www
http://atif.developer.ch ¦ homepage
  atif.ghaffar@4unet.net ¦ email

Do you speak Unix?