[imp] using a user pref to set a value in conf.php
Jan Schneider
jan at horde.org
Tue Feb 1 11:23:50 PST 2005
Zitat von Liam Hoekenga <liamr at umich.edu>:
>>> Our antispam solution has two classes of users. People who can
>>> "train" their spam filters, and people who have a "generic" set of
>>> filters. I've created a horde pref "spam_trainer", and I'd like to
>>> be able to determine the behavior of the spam reporting links based
>>> on whether this preference is set or not.
>>>
>>> So.... I guess the question is, how to get access to the preferences scope
>>> inside of config/conf.php?
>>
>> That's not possible, because the configuration is loaded before the
>> preferences.
>
> Well, poop.
>
> Here's the situation then. We're using DSPAM as our spam management
> solution.
> We've got two classes of users - "trainers" and "globalusers".
>
> Currently, our trainers are able to refine their personal spam filters by
> forwarding / bouncing mail to spam.username at example.com or
> notspam.username at example.com. So, I've set things up to use the spam_bounce
> hook, and that works great.
>
> More recently, it was decided that the people using the "generic"
> filters (aka
> "globaluser") should be presented with the spam management links as well. In
> their case, the "report as spam" and "report as innocent" buttons
> should invoke
> a binary instead of bouncing the email. Having the spam management
> links save
> "pristine" copies of the email someplace on the webmail servers, and
> we'll push
> it out at some regular interval and use this mail to further refine the
> generic
> spam definitions.
>
> I had hoped to decide the appropriate behavior based on my "spam_trainer"
> preference, but I'm not sure how to proceed if I can't access the prefs scope
> from the conf file.
>
> Any suggestions?
You could "rewrite" the spam configuration in imp/lib/base.php after the
application has been pushed on the registry stack.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the imp
mailing list