From: Mark M. <Mar...@ij...> - 2006-02-28 14:42:24
|
Felix, > What is considered the best way to introduce a configuration value? I > read about maps and policy banks but did not find a real solution what > to do... > > I want to add a per-user setting for the spam filter to use. I thought > about using something like > > @spam_filter_maps = ({ 'te...@te...valid' => 'dspam', }); Makes sense. > as shown in the the sample configuration file: > > #@spam_tag2_level_maps = ( > > # { 'us...@ex...' => 8.0, '.example.com' => 6.0 }, > > # \$sa_tag2_level_deflt, # catchall default > > #); > > Therefore I expected that > > lookup(0, 'te...@te...valid', ca('spam_filter_maps')) > should return 'dspam' but the call always returns (undef, undef). The third argument to sub lookup should be a list, not a ref to a list. The call should be: lookup(0, 'te...@te...valid', @{ca('spam_filter_maps')} ) like in some other places in the code. Mark |