1 --- dspam-3.6.5/webui/cgi-bin/Makefile.am 2006-05-07 16:07:10.368456730 +0300
2 +++ dspam-3.6.5/webui/cgi-bin/Makefile.am 2006-05-07 16:23:40.160557961 +0300
7 -bin_SCRIPTS = configure_pl
8 -CLEANFILES = configure.pl
11 +bindir = $(pkgdatadir)/cgi
17 +CLEANFILES = configure.pl
19 +webappdir = /etc/webapps/$(PACKAGE_NAME)
20 +webapp_DATA = configure.pl \
33 -e 's,@bindir\@,$(bindir),g'
35 -configure_pl: configure.pl.in Makefile
36 +configure.pl: configure.pl.in Makefile
37 ${sed_substitute_variables} < $(srcdir)/configure.pl.in > configure.pl
39 --- dspam-3.6.5/webui/cgi-bin/templates/Makefile.am 2006-02-13 18:16:57.000000000 +0200
40 +++ dspam-3.6.5.config/webui/cgi-bin/templates/Makefile.am 2006-05-07 15:24:39.881592142 +0300
45 +templatesdir = $(pkgdatadir)/cgi/templates
49 nav_performance.html \
50 --- dspam-3.6.5/webui/htdocs/Makefile.am 2005-07-02 06:59:52.000000000 +0300
51 +++ dspam-3.6.5.config/webui/htdocs/Makefile.am 2006-05-07 15:25:19.162469057 +0300
53 # webui/htdocs/Makefile.am
57 +htdocsdir = $(pkgdatadir)/htdocs
62 --- dspam-3.9.0/webui/cgi-bin/graph.cgi~ 2010-01-11 22:21:58.000000000 +0100
63 +++ dspam-3.9.0/webui/cgi-bin/graph.cgi 2010-04-27 00:17:05.000000000 +0200
65 use vars qw { %CONFIG %FORM %LANG @spam_day @nonspam_day @period @data };
67 # Read configuration parameters common to all CGI scripts
68 -require "configure.pl";
69 +require "/etc/webapps/dspam/configure.pl";
77 -GD::Graph::colour::read_rgb("rgb.txt");
78 +GD::Graph::colour::read_rgb("/usr/X11R6/lib/X11/rgb.txt");
81 my($spam, $nonspam, $period) = split(/\_/, $FORM{'data'});
82 --- dspam-3.9.0/webui/cgi-bin/admingraph.cgi~ 2010-01-11 22:21:58.000000000 +0100
83 +++ dspam-3.9.0/webui/cgi-bin/admingraph.cgi 2010-04-27 00:20:27.000000000 +0200
85 use vars qw { %CONFIG %FORM %LANG @spam @nonspam @period @data @inoc @sm @fp @wh @corpus @virus @black @block };
87 # Read configuration parameters common to all CGI scripts
88 -require "configure.pl";
89 +require "/etc/webapps/dspam/configure.pl";
97 -GD::Graph::colour::read_rgb("rgb.txt");
98 +GD::Graph::colour::read_rgb("/usr/X11R6/lib/X11/rgb.txt");
101 my($spam, $nonspam, $sm, $fp, $inoc, $wh, $corpus, $virus, $black, $block, $period) = split(/\_/, $FORM{'data'});
102 --- dspam-3.8.0/webui/cgi-bin/dspam.cgi.orig 2006-06-01 21:14:14.000000000 +0200
103 +++ dspam-3.8.0/webui/cgi-bin/dspam.cgi 2009-12-08 00:41:41.991051714 +0100
107 # Read configuration parameters common to all CGI scripts
108 -require "configure.pl";
109 +require "/etc/webapps/dspam/configure.pl";
111 if($CONFIG{"DATE_FORMAT"}) {
112 use POSIX qw(strftime);
115 $CONFIG{'ADMIN'} = 0;
116 if ($ENV{'REMOTE_USER'} ne "") {
117 - open(FILE, "<./admins");
118 + open(FILE, "</etc/webapps/dspam/admins");
121 if ($_ eq $ENV{'REMOTE_USER'}) {
122 @@ -2065,10 +2065,10 @@
124 if (keys(%PREFS) eq "0" || $CONFIG{'PREFERENCES_EXTENSION'} != 1) {
126 - if (! -e "./default.prefs") {
127 + if (! -e "/etc/webapps/dspam/default.prefs") {
128 &error("$LANG{'error_load_default_prefs'}");
130 - open(FILE, "<./default.prefs");
131 + open(FILE, "</etc/webapps/dspam/default.prefs");
134 my($directive, $value) = split(/\=/);
135 --- dspam-3.6.5/webui/cgi-bin/admin.cgi 2006-05-07 16:34:00.934427888 +0300
136 +++ dspam-3.6.5/webui/cgi-bin/admin.cgi 2006-05-07 16:37:17.648823791 +0300
140 # Read configuration parameters common to all CGI scripts
141 -require "configure.pl";
142 +require "/etc/webapps/dspam/configure.pl";
145 # The current CGI script
150 - open(FILE, "<./admins");
151 + open(FILE, "</etc/webapps/dspam/admins");
154 if ($_ eq $ENV{'REMOTE_USER'}) {
155 @@ -125,14 +125,14 @@
156 $USER = $FORM{'username'};
158 if ($FORM{'username'} eq "") {
159 - $FILE = "./default.prefs";
160 + $FILE = "/etc/webapps/dspam/default.prefs";
161 if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "$CONFIG{'DSPAM_HOME'}/default.prefs") {
162 $DATA{'ERROR'} = "<em>WARNING:</em> " .
163 "These default preferences will not be loaded by DSPAM, but only by ".
164 " the CGI interface when a user initially sets up their preferences. ".
165 "To have DSPAM override its configuration with these default ".
166 "preferences, symlink $CONFIG{'DSPAM_HOME'}/default.prefs to the ".
167 - "default.prefs file in the CGI directory.<BR><BR>";
168 + "default.prefs file in the /etc/webapps/dspam directory.<BR><BR>";
171 $FILE = GetPath($FORM{'username'}) . ".prefs";
176 - %PREFS = GetPrefs($USER, "./default.prefs");
177 + %PREFS = GetPrefs($USER, "/etc/webapps/dspam/default.prefs");
179 %PREFS = GetPrefs($USER, $FILE);
185 - $FILE = "./default.prefs";
186 + $FILE = "/etc/webapps/dspam/default.prefs";
190 --- dspam-3.9.0/webui/cgi-bin/configure.pl.in~ 2010-01-11 22:21:58.000000000 +0100
191 +++ dspam-3.9.0/webui/cgi-bin/configure.pl.in 2010-04-27 00:33:18.000000000 +0200
194 # Default DSPAM enviroment
195 $CONFIG{'DSPAM_HOME'} = "@dspam_home@";
196 -$CONFIG{'DSPAM_BIN'} = "@bindir@";
197 +$CONFIG{'DSPAM_BIN'} = "/usr/bin";
198 $CONFIG{'DSPAM'} = $CONFIG{'DSPAM_BIN'} . "/dspam";
199 $CONFIG{'DSPAM_STATS'} = $CONFIG{'DSPAM_BIN'} . "/dspam_stats";
200 $CONFIG{'DSPAM_ARGS'} = "--deliver=innocent --class=innocent " .
203 $CONFIG{'DSPAM_PROCESSES'} = "ps auxw | grep dspam | grep -v 'grep\|cgi\|sock' | wc -l"; # use ps -deaf for Solaris
204 $CONFIG{'MAIL_QUEUE'} = "mailq | grep '^[0-9,A-F]\{10,12\}[\t ][\t ]*[1-9]' | wc -l";
206 -$CONFIG{'WEB_ROOT'} = ""; # URL location of included htdocs/ files
207 +$CONFIG{'WEB_ROOT'} = "/dspam/htdocs"; # URL location of included htdocs/ files
209 # Default DSPAM display
210 #$CONFIG{'DATE_FORMAT'} = "%d.%m.%Y %H:%M"; # Date format in strftime style
212 $ENV{'PATH'} = "$ENV{'PATH'}:$CONFIG{'DSPAM_BIN'}";
214 # Autodetect filesystem layout and preference options
215 -$CONFIG{'AUTODETECT'} = 1;
216 +#$CONFIG{'AUTODETECT'} = 1;
218 # Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect
219 # so you will need to specify some features manually:
220 -#$CONFIG{'AUTODETECT'} = 0;
221 -#$CONFIG{'LARGE_SCALE'} = 0;
222 -#$CONFIG{'DOMAIN_SCALE'}= 0;
223 -#$CONFIG{'PREFERENCES_EXTENSION'} = 0;
224 +$CONFIG{'AUTODETECT'} = 1;
225 +$CONFIG{'LARGE_SCALE'} = 1;
226 +$CONFIG{'DOMAIN_SCALE'}= 0;
227 +$CONFIG{'PREFERENCES_EXTENSION'} = 1;
230 $CONFIG{'DSPAM_VERSION'} = "Unknown Version";