View | Details | Raw Unified | Return to bug 68625
Collapse All | Expand All

(-)dspam/Makefile (-69 / +256 lines)
Lines 6-36 Link Here
6
#
6
#
7
7
8
PORTNAME=	dspam
8
PORTNAME=	dspam
9
PORTVERSION=	2.10.6
9
PORTVERSION=	3.0.0
10
CATEGORIES=	mail
10
CATEGORIES=	mail
11
MASTER_SITES=	http://www.nuclearelephant.com/projects/dspam/sources/
11
MASTER_SITES=	http://www.nuclearelephant.com/projects/dspam/sources/
12
12
13
MAINTAINER=	rob@debank.tv
13
MAINTAINER=	rob@debank.tv
14
COMMENT=	A server-side bayesian spam filter
14
COMMENT=	A server-side bayesian spam filter
15
15
16
OPTIONS=	MYSQL "Use MySQL and not db4 as database" off \
16
## debug / log options
17
		MYSQL_COMPRESS "Compress dspam <--> MySQL" off \
17
OPTIONS=	NO_CONFLICTS "DO NOT conflict with dspam-2.x" off
18
		MAILDROP "Use Maildrop as local delivery agent" off \
18
OPTIONS+=	DEBUG "Enable debug in DSPAM_HOME/dspam.debug" on
19
		PROCMAIL "Use Procmail as local delivery agent" off \
19
OPTIONS+=	VERBOSE_DEBUG "Enable verbose debug" on
20
		SENDMAIL_LDA "Use Sendmail as local delivery agent" off \
20
OPTIONS+=	USER_LOGGING	"Log mail in DSPAM_HOME/data/user/user.log" on
21
		SENDMAIL "Play nice with sendmail server" off \
21
OPTIONS+=	SYSTEM_LOGGING	"Log some info DSPAM_HOME/system.log" on
22
		QMAIL "Play nice with Qmail mail server" off \
22
OPTIONS+=	SAT "Log spam source addresses to syslog" on
23
		ENABLE_SPAM_DELIVERY "Deliver messages marked as spam" off \
23
## algorithm options
24
		SIGNATURE_HEADERS "Put signatures in the header" off \
24
OPTIONS+=	TRAD_BAYES "Enable traditional-bayesian" on
25
		WHITELIST "Automatic whitelisting of ham" off \
25
OPTIONS+=	ALT_BAYES "Enable alternative-bayesian" on
26
		OPT_IN  "Enable opt in" off \
26
OPTIONS+=	RNB "Use Robinson Naive Bayesian calculation" off
27
		TRUSTED_USERS "Disable trusted user security" off \
27
OPTIONS+=	CHI_SQUARE "Use Fisher-Robinson Inv Chi-Square" off
28
		TUM "Enables TuM (Train until Mature)" off \
28
OPTIONS+=	RPV "Use Robinson technique combining p-values" off
29
		ALT_BAYESIAN "Enable alternative-bayesian" on \
29
OPTIONS+=	TEST_COND "More inoculous results rapidly, risk fps" on
30
		NO_BIAS "Disable bias" off \
30
OPTIONS+=	NO_BIAS "No bias toward innocent mail" off
31
		VIRT_USERS "Enable virtual users (needs MYSQL)" off \
31
OPTIONS+=	WHITELIST "Automatic whitelisting of ham" off
32
		SAT "Enable spam source address logging" off \
32
OPTIONS+=	NEURAL_NET "Enable neural networking" off
33
		VERBOSE_DEBUG "Enable verbose debug" off
33
## run-time configure  options
34
OPTIONS+=	HOMEDIR_DOT "Dot files in ~/USER not DSPAM_HOME" off
35
OPTIONS+=	OPT_IN "Run only for users with .dspam" off
36
OPTIONS+=	TRUSTED_USERS "Disable trusted user security" off
37
## mesage taging options
38
OPTIONS+=	SPAM_SUBJ "Prepends SPAM to the Subject header" off
39
OPTIONS+=	SIGNATURE_HEADERS "Put signatures IDs in the header" off
40
OPTIONS+=	WEBMAIL "Only with mail stored server-side" off
41
## back-end
42
OPTIONS+=	MYSQL "Use MySQL as back-end" off
43
OPTIONS+=	MYSQL_COMPRESS "Compress dspam <--> MySQL" off
44
OPTIONS+=	POSTGRESQL73 "Use PostgreSQL v.7.3 as back-end" off
45
OPTIONS+=	POSTGRESQL74 "Use PostgreSQL v.7.4 as back-end" off
46
#OPTIONS+=	PGSQL_INSTALLED "You have the client installed" on
47
OPTIONS+=	ORACLE "Use Oracle as back-end (BROKEN)" off
48
OPTIONS+=	VIRT_USERS "Enable virtual users (needs SQL back-end)" off
49
OPTIONS+=	LONG_USERNAMES "Usernames longer that OS supports" off
50
OPTIONS+=	LARGE_SCALE "File structure for large scale" off
51
OPTIONS+=	DOMAIN_SCALE "File structure for multiple domains" off
52
OPTIONS+=	SIGNATURE_ATACH "Put server-side signature in mails" off
53
## MTA and LDA
54
OPTIONS+=	MAILDROP "Use Maildrop as local delivery agent" off
55
OPTIONS+=	PROCMAIL "Use Procmail as local delivery agent" off
56
OPTIONS+=	SENDMAIL_LDA "Use Sendmail as local delivery agent" off
57
OPTIONS+=	SENDMAIL "Play nice with sendmail server" off
58
OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
59
OPTIONS+=	BROKEN_ERR_CODES "99=spam, 0=not, other=error (qmailish)" off
60
OPTIONS+=	BROKEN_MTA "Enable if MTA pases ^M to dspam" off
61
OPTIONS+=	CGI "Install CGI (pulls in apache)" off
34
62
35
USE_LIBTOOL_VER=13
63
USE_LIBTOOL_VER=13
36
USE_REINPLACE=	yes
64
USE_REINPLACE=	yes
Lines 47-52 Link Here
47
75
48
.include <bsd.port.pre.mk>
76
.include <bsd.port.pre.mk>
49
77
78
.if !defined(WITH_NO_CONFLICTS)
79
CONFLICTS=	dspam-2*
80
.endif
81
82
.if defined(WITH_DEBUG)
83
CONFIGURE_ARGS+=	--enable-debug
84
.else
85
CONFIGURE_ARGS+=	--disable-debug
86
.endif
87
88
.if defined(WITH_VERBOSE_DEBUG)
89
CONFIGURE_ARGS+=	--enable-verbose-debug
90
.else
91
CONFIGURE_ARGS+=	--disable-verbose-debug
92
.endif
93
94
.if defined(WITH_SYSTEM_LOGGING)
95
CONFIGURE_ARGS+=	--enable-logging
96
.else
97
CONFIGURE_ARGS+=	--disable-system-logging
98
.endif
99
100
.if defined(WITH_USER_LOGGING)
101
CONFIGURE_ARGS+=	--disable-user-logging
102
.else
103
CONFIGURE_ARGS+=	--enable-user-logging
104
.endif
105
106
.if defined(WITH_SAT)
107
CONFIGURE_ARGS+=	--enable-source-address-tracking
108
.endif
109
110
.if defined(WITH_TRAD_BAYES)
111
CONFIGURE_ARGS+=	--enable-traditional-bayesian
112
.else
113
CONFIGURE_ARGS+=	--disable-traditional-bayesian
114
.endif
115
116
.if defined(WITH_ALT_BAYES)
117
CONFIGURE_ARGS+=	--enable-alternative-bayesian
118
.else
119
CONFIGURE_ARGS+=	--disable-alternative-bayesian
120
.endif
121
122
.if defined(WITH_RNB)
123
CONFIGURE_ARGS+=	 --enable-robinson
124
else
125
CONFIGURE_ARGS+=	 --disable-robinson
126
.endif
127
128
.if defined(WITH_CHI_SQUARE)
129
CONFIGURE_ARGS+=	 --enable-robinson
130
.else
131
CONFIGURE_ARGS+=	 --disable-robinson
132
.endif
133
134
.if defined(WITH_RPV)
135
CONFIGURE_ARGS+=	 --enable-robinson-pvalues
136
.else
137
CONFIGURE_ARGS+=	 --disable-robinson-pvalues
138
.endif
139
140
.if defined(WITH_TEST_COND)
141
CONFIGURE_ARGS+=	 --enable-test-conditional
142
.else
143
CONFIGURE_ARGS+=	 --disable-test-conditional
144
.endif
145
146
.if defined(WITH_NO_BIAS)
147
CONFIGURE_ARGS+=	--disable-bias
148
.endif
149
150
.if defined(WITH_WHITELIST)
151
CONFIGURE_ARGS+=	--enable-whitelist
152
.endif
153
154
.if defined(WITH_NEURAL_NET)
155
CONFIGURE_ARGS+=	--enable-neural-networking
156
#NEED_M_P=. @${TRUE}
157
.endif
158
159
.if defined(WITH_HOMEDIR_DOT)
160
CONFIGURE_ARGS+=	  --enable-homedir-dotfiles
161
.endif
162
163
.if defined(WITH_OPT_IN)
164
CONFIGURE_ARGS+=	  --enable-opt-in
165
.endif
166
167
.if defined(WITH_TRUSTED_USERS)
168
CONFIGURE_ARGS+=	--disable-trusted-user-security
169
.endif
170
171
.if defined(WITH_SPAM_SUBJ)
172
CONFIGURE_ARGS+=	--enable-spam-subject
173
.endif
174
175
.if defined(WITH_SIGNATURE_HEADERS)
176
CONFIGURE_ARGS+=	--enable-signature-headers
177
.endif
178
179
.if defined(SIGNATURE_ATACH)
180
CONFIGURE_ARGS+=	--enable-signature-attachments
181
.endif
182
183
.if defined(WITH_WEBMAIL)
184
CONFIGURE_ARGS+=	--enable-webmail
185
.endif
186
50
.if defined(WITH_MYSQL)
187
.if defined(WITH_MYSQL)
51
USE_MYSQL=	yes
188
USE_MYSQL=	yes
52
CONFIGURE_ARGS+=	--with-storage-driver=mysql_drv \
189
CONFIGURE_ARGS+=	--with-storage-driver=mysql_drv \
Lines 54-93 Link Here
54
		--with-mysql-libraries=${LOCALBASE}/lib/mysql
191
		--with-mysql-libraries=${LOCALBASE}/lib/mysql
55
PLIST_SUB+=	DB4="@comment "
192
PLIST_SUB+=	DB4="@comment "
56
PLIST_SUB+=	MYSQL=""
193
PLIST_SUB+=	MYSQL=""
194
PLIST_SUB+=	PGSQL="@comment "
57
SED_SCRIPT+=	-e 's,%%MYSQL%%,,g'
195
SED_SCRIPT+=	-e 's,%%MYSQL%%,,g'
58
.else
196
SED_SCRIPT+=	-e '/%%PGSQL%%/D'
197
.if defined(WITH_MYSQL_COMPRESS)
198
CONFIGURE_ARGS+=	--enable-client-compression
199
.endif
200
.endif
201
202
.if defined(WITH_POSTGRESQL73)
203
LIB_DEPENDS=	pq.3:${PORTSDIR}/databases/postgresql73
204
#BUILD_DEPENDS= ${LIB_DEPENDS}
205
CONFIGURE_ARGS+=	--with-storage-driver=pgsql_drv \
206
		--with-pgsql-includes=${LOCALBASE}/include \
207
		--with-pgsql-libraries=${LOCALBASE}/lib
208
PLIST_SUB+=	DB4="@comment "
209
PLIST_SUB+=	MYSQL="@comment "
210
PLIST_SUB+=	PGSQL=""
211
SED_SCRIPT+=	-e '/%%MYSQL%%/D'
212
SED_SCRIPT+=	-e 's,%%PGSQL%%,,g'
213
.endif
214
215
.if defined(WITH_POSTGRESQL74)
216
LIB_DEPENDS=	ecpg.4:${PORTSDIR}/databases/postgresql7
217
#BUILD_DEPENDS=	${LIB_DEPENDS}
218
CONFIGURE_ARGS+=	--with-storage-driver=pgsql_drv \
219
		--with-pgsql-includes=${LOCALBASE}/include \
220
		--with-pgsql-libraries=${LOCALBASE}/lib
221
PLIST_SUB+=	DB4="@comment "
222
PLIST_SUB+=	MYSQL="@comment "
223
PLIST_SUB+=	PGSQL=""
224
SED_SCRIPT+=	-e '/%%MYSQL%%/D'
225
SED_SCRIPT+=	-e 's,%%PGSQL%%,,g'
226
.endif
227
228
.if defined(WITH_ORACLE)
229
BUILD_DEPENDS=	${LOCALBASE}/oracle7/rdbms/lib/libnlsrtl3.a:${PORTSDIR}/databases/oracle7-client
230
CONFIGURE_ARGS+=	--with-storage-driver=ora_drv \
231
		--with-oracle-home=	${LOCALBASE}/oracle7
232
.endif
233
234
.if defined(WITH_VIRT_USERS)
235
CONFIGURE_ARGS+=	--enable-virtual-users
236
#NEED_M_P=. @${TRUE}
237
.endif
238
239
.if !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) || defined(WITH_ORACLE))
59
LIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
240
LIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
60
CONFIGURE_ARGS+=	--with-db4-includes=${LOCALBASE}/include/db41
241
CONFIGURE_ARGS+=	--with-db4-includes=${LOCALBASE}/include/db41
61
PLIST_SUB+=	DB4=""
242
PLIST_SUB+=	DB4=""
62
PLIST_SUB+=	MYSQL="@comment "
243
PLIST_SUB+=	MYSQL="@comment "
244
PLIST_SUB+=	PGSQL="@comment "
63
SED_SCRIPT+=	-e '/%%MYSQL%%/D'
245
SED_SCRIPT+=	-e '/%%MYSQL%%/D'
246
SED_SCRIPT+=	-e '/%%PGSQL%%/D'
64
.endif
247
.endif
65
248
66
.if defined(WITH_MYSQL_COMPRESS)
249
.if defined(WITH_LONG_USERNAMES)
67
CONFIGURE_ARGS+=	--enable-client-compression
250
CONFIGURE_ARGS+=	--enable-long-usernames
68
.endif
251
.endif
69
252
.if defined(WITH_LARGE_SCALE)
70
.if defined(DSPAM_USERDIR)
253
CONFIGURE_ARGS+=	--enable-large-scale
71
CONFIGURE_ARGS+=--with-userdir=${DSPAM_USERDIR}
254
.endif
72
.else
255
.if defined(WITH_DOMAIN_SCALE)
73
CONFIGURE_ARGS+=--with-userdir=${PREFIX}/etc/dspam
256
CONFIGURE_ARGS+=	--enable-domain-scale
74
.endif
257
.endif
75
258
76
.if defined(WITH_MAILDROP)
259
.if defined(WITH_MAILDROP)
77
RUN_DEPENDS+=	maildrop:${PORTSDIR}/mail/maildrop
260
RUN_DEPENDS+=	maildrop:${PORTSDIR}/mail/maildrop
78
CONFIGURE_ARGS+=	--with-local-delivery-agent='${LOCALBASE}/bin/maildrop $u'
261
CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/bin/maildrop $u'
79
.endif
262
.endif
80
263
81
.if defined(WITH_PROCMAIL)
264
.if defined(WITH_PROCMAIL)
82
RUN_DEPENDS+=	procmail:${PORTSDIR}/mail/procmail
265
RUN_DEPENDS+=	procmail:${PORTSDIR}/mail/procmail
83
CONFIGURE_ARGS+=	--with-local-delivery-agent='${LOCALBASE}/bin/procmail $u'
266
CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/bin/procmail $u'
84
.endif
267
.endif
85
268
86
.if defined(WITH_SENDMAIL_LDA) && exists(/usr/sbin/sendmail)
269
.if defined(WITH_SENDMAIL_LDA) && exists(/usr/sbin/sendmail)
87
CONFIGURE_ARGS+=	--with-local-delivery-agent=/usr/sbin/sendmail
270
CONFIGURE_ARGS+=	--with-delivery-agent=/usr/sbin/sendmail
88
.else
271
.else
89
.if defined(WITH_SENDMAIL_LDA) && exists(${LOCALBASE}/sbin/sendmail)
272
.if defined(WITH_SENDMAIL_LDA) && exists(${LOCALBASE}/sbin/sendmail)
90
CONFIGURE_ARGS+=	--with-local-delivery-agent='${LOCALBASE}/sbin/sendmail'
273
CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/sbin/sendmail'
91
.endif
274
.endif
92
.endif
275
.endif
93
276
Lines 99-157 Link Here
99
CONFIGURE_ARGS+=	--with-dspam-mode=4511
282
CONFIGURE_ARGS+=	--with-dspam-mode=4511
100
.endif
283
.endif
101
284
102
.if defined(WITH_SIGNATURE_LIFE)
285
.if defined(WITH_BROKEN_ERR_CODES)
103
CONFIGURE_ARGS+=	--with-signature-life=${WITH_SIGNATURE_LIFE}
286
CONFIGURE_ARGS+=	--enable-broken-return-codes
104
.endif
105
106
.if defined(WITH_ENABLE_SPAM_DELIVERY)
107
CONFIGURE_ARGS+=	--enable-spam-delivery
108
.endif
109
110
.if defined(WITH_SIGNATURE_HEADERS)
111
CONFIGURE_ARGS+=	--enable-signature-headers
112
.endif
287
.endif
113
288
114
.if defined(WITH_WHITELIST)
289
.if defined(DSPAM_HOME)
115
CONFIGURE_ARGS+=	--enable-whitelist
290
CONFIGURE_ARGS+=--with-dspam-home=${DSPAM_HOME}
291
.else
292
CONFIGURE_ARGS+=--with-dspam-home=${PREFIX}/etc/dspam
116
.endif
293
.endif
117
294
118
.if defined(WITH_OPT_IN)
295
#  --with-dspam-home=DIR	  Specify directory where per-user dictionaries
119
CONFIGURE_ARGS+=	--enable-opt-in
296
#  --with-dspam-home-mode=MODE   Set access mode for DSPAM_HOME
120
.endif
297
#  --with-dspam-home-owner=OWNER  Set owner for DSPAM_HOME
298
#  --with-dspam-home-group=GROUP  Set group for DSPAM_HOME
121
299
122
.if defined(WITH_TRUSTED_USERS)
300
#  --with-dspam-mode=MODE         Set access mode for dspam binary
123
CONFIGURE_ARGS+=	--disable-trusted-user-security
301
#  --with-dspam-owner=OWNER       Set owner for dspam binary
124
.endif
302
#  --with-dspam-group=GROUP       Set group for dspam binary
125
303
126
.if defined(WITH_TUM)
304
.if defined(WITH_BROKEN_MTA)
127
CONFIGURE_ARGS+=	--enable-tum
305
CONFIGURE_ARGS+=	--enable-broken-mta
128
.endif
306
.endif
129
307
130
.if defined(WITH_ALT_BAYESIAN)
308
.if defined(WITH_SIGNATURE_LIFE)
131
CONFIGURE_ARGS+=	--enable-alternative-bayesian
309
CONFIGURE_ARGS+=	--with-signature-life=${WITH_SIGNATURE_LIFE}
132
.endif
310
.endif
133
311
134
.if defined(WITH_NO_BIAS)
312
.if defined(QUARANTINE_AGENT)
135
CONFIGURE_ARGS+=	--disable-bias
313
CONFIGURE_ARGS+=	--with-quarantine-agent=${QUARANTINE_AGENT}
136
.endif
314
.endif
137
315
138
.if defined(WITH_VIRT_USERS)
316
.if defined(WITH_CGI)
139
CONFIGURE_ARGS+=	--enable-virtual-users
317
RUN_DEPENDS=	${LOCALBASE}/etc/apache/httpd.conf:${PORTSDIR}/${APACHE_PORT}
140
.endif
318
.endif
141
319
142
.if defined(WITH_SAT)
320
MAN1=	dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 dspam_stats.1
143
CONFIGURE_ARGS+=	--enable-source-address-tracking
144
.endif
145
321
146
.if defined(WITH_VERBOSE_DEBUG)
322
DOCS=	CHANGELOG README LICENSE RELEASE.NOTES
147
CONFIGURE_ARGS+=	--enable-verbose-debug
148
.endif
149
323
150
DOCS=		CHANGE README
324
pre-everything::
325
	@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
151
326
152
post-patch:
327
post-patch:
153
	@${REINPLACE_CMD} -e 's|%%LIBTOOLFLAGS%%|${LIBTOOLFLAGS}|g ; \
328
	@${REINPLACE_CMD} -e 's|%%LIBTOOLFLAGS%%|${LIBTOOLFLAGS}|g ; \
154
		s|-ldb-4.1|-ldb41|g' ${WRKSRC}/configure
329
		s|-ldb-4.1|-ldb41|g' ${WRKSRC}/configure
330
	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
331
		${WRKSRC}/Makefile.in
155
332
156
pre-configure:
333
pre-configure:
157
.if defined(WITH_MAILDROP) && (defined(WITH_PROCMAIL) || defined(WITH_SENDMAIL_LDA))
334
.if defined(WITH_MAILDROP) && (defined(WITH_PROCMAIL) || defined(WITH_SENDMAIL_LDA))
Lines 162-178 Link Here
162
	@${ECHO_CMD} "You can only use one local delivery agent at once."
339
	@${ECHO_CMD} "You can only use one local delivery agent at once."
163
	@${FALSE}
340
	@${FALSE}
164
.endif
341
.endif
165
.if !defined(WITH_MYSQL) && (defined(WITH_MYSQL_COMPRESS) || defined(WITH_VIRT_USERS))
342
.if defined(WITH_NEURAL_NET) && !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL))
166
	@${ECHO_CMD} "You need MySQL support to use this feature."
343
	@${ECHO_CMD} "You need MySQL or POSTGRESQL to use neural networking."
344
	@${FALSE}
345
.endif
346
.if defined(WITH_VIRT_USERS) && !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL) || defined(WITH_ORACLE))
347
	@${ECHO_CMD} "You need MySQL, POSTGRESQL or ORACLE for virtual users."
167
	@${FALSE}
348
	@${FALSE}
168
.endif
349
.endif
169
350
170
post-install:
351
post-install:
171
.if defined(WITH_MYSQL)
352
.if defined(WITH_MYSQL)
172
	@${MKDIR} ${EXAMPLESDIR}
353
	@${MKDIR} ${EXAMPLESDIR}/mysql
173
	cd ${WRKSRC}/tools.mysql_drv && \
354
	cd ${WRKSRC}/tools.mysql_drv && \
174
		${INSTALL_DATA} README *.sql* ${EXAMPLESDIR}
355
		${INSTALL_DATA} README *.sql* ${EXAMPLESDIR}/mysql
175
	${INSTALL_DATA} ${FILESDIR}/mysql.data ${EXAMPLESDIR}
356
	${INSTALL_DATA} ${FILESDIR}/mysql.data ${EXAMPLESDIR}/mysql
357
.endif
358
.if defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74)
359
	${MKDIR} ${EXAMPLESDIR}/pgsql
360
	cd ${WRKSRC}/tools.pgsql_drv && \
361
		${INSTALL_DATA} README *.sql ${EXAMPLESDIR}/pgsql
362
	${INSTALL_DATA} ${FILESDIR}/pgsql.data ${EXAMPLESDIR}/pgsql
176
.endif
363
.endif
177
.if !defined(NOPORTDOCS)
364
.if !defined(NOPORTDOCS)
178
	@${MKDIR} ${DOCSDIR}
365
	@${MKDIR} ${DOCSDIR}
(-)dspam/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (dspam-2.10.6.tar.gz) = ddb40d26cc923d7569d48b3072e61715
1
MD5 (dspam-3.0.0.tar.gz) = f5b568e8fea50faaf4c1fcabee177934
2
SIZE (dspam-2.10.6.tar.gz) = 485466
2
SIZE (dspam-3.0.0.tar.gz) = 575382
(-)dspam/files/README.cgi (+56 lines)
Line 0 Link Here
1
DSPAM CGI
2
3
   The CGI will need to function in the same group as the dspam agent.  The
4
   best way to do this is to create a separate virtualhost specifically for
5
   the CGI and assign it to run in the MTA group.  If you are using
6
   procmail, additional configuration may also be necessary (see below).
7
   Please note that Apache users running under suexec do NOT take on the 
8
   identity of the groups specified in /etc/group; e.g. you will need to 
9
   specifically assign the group in httpd.conf.
10
11
   NOTE: Because the DSPAM CGI is a script, DSPAM will not retain its 
12
         privileges when called. If you are running procmail, this will become
13
         a problem as procmail requires root privileges to deliver. The easiest
14
         hack around this is to create a procmail.dspam binary and make it
15
         setuid root, then make it executable only by the mail group (or 
16
         whatever group DSPAM and the CGI run in).
17
18
   The DSPAM CGI has a minimal configuration inside the dspam.cgi file. You'll
19
   want to check dspam.cgi and make sure all of the settings are correct. In
20
   most cases, the only that will be necessary to change are the large-scale
21
   or domain-scale flags.
22
23
   Once you've configured the CGI, there are two more things you'll want to do.
24
   
25
   1. Edit templates/nav_performance.html
26
      Change yourdomain to whatever your domain name is.
27
28
   2. Make any changes to default.prefs. This will set the default preferences
29
      for a user. The file should reflect your system wide defaults. An example
30
      is provided in the cgi directory...
31
32
trainingMode=TEFT
33
spamAction=quarantine
34
spamSubject=[SPAM]
35
enableBNR=on
36
enableWhitelist=on
37
38
     By default, the parameters specified on the commandline will be used. If,
39
     however, a preference is found for the particular user those preferences
40
     will override the commandline. As a result, you'll want to remove any
41
     options from the CGI that you don't want users to set (possibly
42
     training mode).
43
44
   If you plan on leaving DSPAM's logging function enabled, and would like to
45
   produce pretty graphs for your users, the graph.cgi script requires the
46
   following be installed on your machine:
47
48
   - GD Graphics Library (http://www.boutell.com/gd/)
49
   - The following PERL modules:
50
     (http://www.perl.com/CPAN/modules/by-module/GD/)
51
52
     . GD
53
     . GD-Graph3d
54
     . GDGraph
55
     . GDTextUtil
56
(-)dspam/files/convert2db.sql (+16 lines)
Line 0 Link Here
1
alter table dspam_stats add spam_learned int;
2
alter table dspam_stats add innocent_learned int;
3
alter table dspam_stats add spam_classified int;
4
alter table dspam_stats add innocent_classified int;
5
update dspam_stats set spam_learned = total_spam;
6
update dspam_stats set innocent_learned = total_innocent;
7
update dspam_stats set spam_classified = 0, innocent_classified = 0;
8
alter table dspam_stats drop column total_spam;
9
alter table dspam_stats drop column total_innocent;
10
alter table dspam_stats add spam_misclassified int;
11
alter table dspam_stats add innocent_misclassified int;
12
update dspam_stats set spam_misclassified = spam_misses;
13
update dspam_stats set innocent_misclassified = false_positives;
14
alter table dspam_stats drop column spam_misses;
15
alter table dspam_stats drop column false_positives;
16
(-)dspam/files/modify2db.sql (+12 lines)
Line 0 Link Here
1
alter table dspam_stats add spam_learned int;
2
alter table dspam_stats add innocent_learned int;
3
alter table dspam_stats add spam_classified int;
4
alter table dspam_stats add innocent_classified int;
5
update dspam_stats set spam_learned = total_spam;
6
update dspam_stats set innocent_learned = total_innocent;
7
update dspam_stats set spam_classified = 0, innocent_classified = 0;
8
alter table dspam_stats add spam_misclassified int;
9
alter table dspam_stats add innocent_misclassified int;
10
update dspam_stats set spam_misclassified = spam_misses;
11
update dspam_stats set innocent_misclassified = false_positives;
12
(-)dspam/files/patch-configure (-3 / +3 lines)
Lines 1-6 Link Here
1
--- configure.orig	Wed Nov 26 14:35:34 2003
1
--- configure.orig	Sat Jul  3 14:18:37 2004
2
+++ configure	Thu Dec 11 14:00:18 2003
2
+++ configure	Sat Jul  3 14:18:57 2004
3
@@ -7548,7 +7548,8 @@
3
@@ -19272,7 +19272,8 @@
4
 
4
 
5
 
5
 
6
 # This can be used to rebuild libtool when needed
6
 # This can be used to rebuild libtool when needed
(-)dspam/files/patch-dspam.c (-17 lines)
Lines 1-17 Link Here
1
--- dspam.c.orig	Fri Apr  2 18:34:35 2004
2
+++ dspam.c	Mon Apr 26 23:59:03 2004
3
@@ -2422,12 +2422,12 @@
4
         i++;
5
       }
6
     }
7
-    arg = strsep (&margs, " ");
8
-
9
+ 
10
     if (arg != NULL) {
11
       strlcat (args, a, sizeof(args));
12
       strlcat (args, " ", sizeof (args));
13
     }
14
+    arg = strsep (&margs, " ");
15
   }
16
   free (mmargs);
17
 
(-)dspam/files/pgsql.data (+5 lines)
Line 0 Link Here
1
/tmp
2
3
username
4
password
5
dspam_database
(-)dspam/files/sync_db.sql (+3 lines)
Line 0 Link Here
1
2
update dspam_stats set spam_misclassified = spam_misses;
3
update dspam_stats set innocent_misclassified = false_positives;
(-)dspam/pkg-install (+61 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
5
PATH=/bin:/usr/sbin
6
7
upgradewarning() {
8
	echo "
9
10
	=======================================================================
11
	Note for upgraders from dspam 2.x:
12
	- DSPAM v3.0 has moved many features out to the commandline.
13
	- Other configure-time arguments have also been changed or removed.
14
	- The stucture of the database (MySQL, Oracle) has changed; if you use
15
	one of this the PKGMESSAGE will tell you what do do.
16
17
	While this port tries his best to help you with the upgrade, be sure
18
	to read the section UPGRADING of 1.1 INSTALLATION - UPGRADING from
19
	%%PORTDOCS%%/%%DOCSDIR%%/README. Because of the command line changes you
20
	risk to have all you mails going to the bit bucket with NO WARNING.
21
	
22
	Do not continue to install this port without shutting down your MTA
23
	and/or disableing dspam (if you are installing in the same place).
24
	If you whant to test the new version, install with PREFIX != /usr/local 
25
	and choose WITH_NO_CONFLICT in the OPTIONS menu; otherwise if you have 
26
	dspam-2.x this port will refuse to install.
27
	========================================================================
28
"
29
        sleep 3
30
}
31
32
featurewarning() {
33
	echo "
34
	
35
	Known issues:
36
	- WITH_ORACLE does not configure.
37
	- the new POP3 Proxy integration is not yet handled by this port
38
	- due to the removal of postgress client port from the Ports Tree
39
	if you choose WITH_POSTRESQL Postgresql 7.3 will be installed; if you
40
	plan to use a server on another machine do:
41
		1. Hit Ctrl+C now.
42
		2. Go in databases/postgresql73 and make -DWITHOUT_SERVER install
43
		3. Come back here and make install
44
	- the cgi part is really untested and requires more work
45
	- some changes from rc2 are not merged yet.
46
	- no supplimantary {platform|MTA|LDA,etc.} documentaion is in yet
47
	- qmail dspam-filter (http://sourceforge.net/projects/dspam-filter/)
48
	is not yet integrated.
49
	"
50
	sleep 8
51
}
52
53
case $2 in
54
PRE-INSTALL)
55
	upgradewarning
56
	featurewarning
57
	;;
58
UPGRADEWARNING)
59
	upgradewarning
60
	;;
61
esac
(-)dspam/pkg-message (-1 / +21 lines)
Lines 1-8 Link Here
1
1
--------------------------------------------------------------------
2
--------------------------------------------------------------------
2
3
3
 See the file %%DOCSDIR%%/README for advice about
4
 See the file %%DOCSDIR%%/README for advice about
4
 how to configure DSPAM with your MTA. Examples are provided for
5
 how to configure DSPAM with your MTA. Examples are provided for
5
 sendmail, exim and other popular MTAs.
6
 sendmail, postfix, exim and courier MTAs.
6
%%MYSQL%%
7
%%MYSQL%%
7
%%MYSQL%% See %%EXAMPLESDIR%%/README
8
%%MYSQL%% See %%EXAMPLESDIR%%/README
8
%%MYSQL%% for instructions on how to configure MySQL
9
%%MYSQL%% for instructions on how to configure MySQL
Lines 12-16 Link Here
12
%%MYSQL%% contains an example configuration for use with MySQL.
13
%%MYSQL%% contains an example configuration for use with MySQL.
13
%%MYSQL%% Edit and install as
14
%%MYSQL%% Edit and install as
14
%%MYSQL%% %%LOCALBASE%%/etc/dspam/mysql.data
15
%%MYSQL%% %%LOCALBASE%%/etc/dspam/mysql.data
16
%%MYSQL%% To modify an existing database use and use it with dspam 3.x:
17
%%MYSQL%% [ TO BE WRITTEN ]
18
%%MYSQL%% dspam versions use
19
%%MYSQL%% %%EXAMPLESDIR%%/convert2db.sql
20
%%MYSQL%% To modify the existing db and use it with both versions use
21
%%MYSQL%% 
22
%%MYSQL%%
23
%%MYSQL%%
24
%%PGSQL%%
25
%%PGSQL%% See %%EXAMPLESDIR%%/README
26
%%PGSQL%% for instructions on how to configure PostrgreSQL
27
%%PGSQL%% for use with DSPAM.
28
%%PGSQL%% [ To add a nice tutorial on this ]
29
%%PGSQL%% [ To add a nice turorial on converting a MySQL DB ]
30
%%PGSQL%% %%EXAMPLESDIR%%/pgsql.data
31
%%PGSQL%% contains an example configuration for use with PostgreSQL.
32
%%PGSQL%% Edit and install as
33
%%PGSQL%% %%LOCALBASE%%/etc/dspam/pgsql.data
34
%%PGSQL%% 
15
35
16
--------------------------------------------------------------------
36
--------------------------------------------------------------------
(-)dspam/pkg-plist (-16 / +31 lines)
Lines 1-28 Link Here
1
@comment $FreeBSD: ports/mail/dspam/pkg-plist,v 1.8 2004/05/04 18:43:30 pav Exp $
2
bin/dspam
1
bin/dspam
3
bin/dspam_2mysql
2
bin/dspam_2sql
4
bin/dspam_dump
5
bin/dspam_clean
3
bin/dspam_clean
6
bin/dspam_corpus
4
bin/dspam_corpus
7
bin/dspam_crc
5
bin/dspam_crc
6
bin/dspam_dump
8
bin/dspam_genaliases
7
bin/dspam_genaliases
9
bin/dspam_merge
8
bin/dspam_merge
10
bin/dspam_ngstats
11
%%DB4%%bin/dspam_purge
12
%%DB4%%bin/dspam_purge.libdb4
13
bin/dspam_stats
9
bin/dspam_stats
14
%%DB4%%bin/libdb4_purge
10
include/dspam/buffer.h
15
lib/libdspam.so
11
include/dspam/decode.h
16
lib/libdspam.so.4
12
include/dspam/error.h
13
include/dspam/lht.h
14
include/dspam/libdspam.h
15
include/dspam/libdspam_objects.h
16
include/dspam/nodetree.h
17
include/dspam/storage_driver.h
17
lib/libdspam.a
18
lib/libdspam.a
19
lib/libdspam.so
20
lib/libdspam.so.5
21
libdata/pkgconfig/dspam.pc
22
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
23
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
18
%%PORTDOCS%%%%DOCSDIR%%/README
24
%%PORTDOCS%%%%DOCSDIR%%/README
19
%%PORTDOCS%%%%DOCSDIR%%/CHANGE
25
%%PORTDOCS%%%%DOCSDIR%%/RELEASE.NOTES
20
%%PORTDOCS%%@dirrm %%DOCSDIR%%
26
%%PORTDOCS%%@dirrm %%DOCSDIR%%
21
%%MYSQL%%%%EXAMPLESDIR%%/README
27
%%MYSQL%%%%EXAMPLESDIR%%/mysql/README
22
%%MYSQL%%%%EXAMPLESDIR%%/mysql.data
28
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql.data
23
%%MYSQL%%%%EXAMPLESDIR%%/mysql_objects.sql.space.optimized
29
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects.sql.space.optimized
24
%%MYSQL%%%%EXAMPLESDIR%%/mysql_objects.sql.speed.optimized
30
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects.sql.speed.optimized
25
%%MYSQL%%%%EXAMPLESDIR%%/purge.sql
31
%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge.sql
26
%%MYSQL%%%%EXAMPLESDIR%%/virtual_users.sql
32
%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_users.sql
33
%%MYSQL%%@dirrm %%EXAMPLESDIR%%/mysql
27
%%MYSQL%%@dirrm %%EXAMPLESDIR%%
34
%%MYSQL%%@dirrm %%EXAMPLESDIR%%
35
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/README
36
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/pgsql.data
37
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/pgsql_objects.sql
38
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/purge.sql
39
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/virtual_users.sql
40
%%PGSQL%%@dirrm %%EXAMPLESDIR%%/pgsql
41
%%PGSQL%%@dirrm %%EXAMPLESDIR%%
42
@dirrm include/dspam
28
@dirrm etc/dspam
43
@dirrm etc/dspam

Return to bug 68625