It seems quite misleading for the user that a disallowed preference is accessible from the WebUI.
It should better be greyed out.
I will be able to provide a patch implementing this, but would like to know if there is a better way to get AllowOverride entries than parsing the config file from the CGI's?
This way works, but we are not sure these are the current parameters (they can have been changed but daemon not reloaded).
I see dspam_notify.pl uses the following code to detect an AllowOverride:
chomp($ALLOW_OVERRIDE = `dspam_admin agg pref 'default' 2>&1 | grep -i -c "Ignoring disallowed preference 'dailyQuarantineSummary'"`);
This code cannot work as the error is sent to syslog and not to stdout/stderr.
Would it be possible to add a --list-allowed-overrides option to dspam_admin (read-only of course)? This would simply list allowed overrides values (one on each line, to be easy to parse), eg:
And why do you think that it is redirecting stdout to syslog?
I guess (not tried without) because syslog support is enabled (and is now the default).
I have obviously tried running the code used in dspam_notifiy.pl, and I get no "Ignoring disallowed preference..." output on stdout, just an entry in syslog (mail facility), eg:
Aug 26 20:02:03 nix dspam: Ignoring disallowed preference 'dailyQuarantineSummary'
You are right. As soon syslog is enabled the disallowed preferences are printed there and not to stdout. I should probably add two additional options to dspam_admin:
allowed preference [user]
disallowed preference [user]
That would be perfect!