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

(-)Makefile (-42 / +11 lines)
Lines 20-28 Link Here
20
MAINTAINER=	itetcu@people.tecnik93.com
20
MAINTAINER=	itetcu@people.tecnik93.com
21
COMMENT=	Bayesian spam filter - stable maintenance version
21
COMMENT=	Bayesian spam filter - stable maintenance version
22
22
23
PORTVER_MAJ=	3.6.3
23
PORTVER_MAJ=	3.6.4
24
#SNAP_DATE=	.20051211.2134
24
#SNAP_DATE=	.20051211.2134
25
25
26
MIN_OPTIONS_VER=	${PORTNAME}-3.6.4
27
26
.ifdef(SNAP_DATE)
28
.ifdef(SNAP_DATE)
27
MASTER_SITES=	http://people.tecnik93.com/~itetcu/FreeBSD/ports/${PORTNAME}/sources/
29
MASTER_SITES=	http://people.tecnik93.com/~itetcu/FreeBSD/ports/${PORTNAME}/sources/
28
WRKSRC=		${WRKDIR}/dspam-${SNAP_DATE}
30
WRKSRC=		${WRKDIR}/dspam-${SNAP_DATE}
Lines 42-51 Link Here
42
OPTIONS+=	BNR_DEBUG "Enable debug for BNR" off
44
OPTIONS+=	BNR_DEBUG "Enable debug for BNR" off
43
OPTIONS+=	PREF_EXT "Preferences in database not in files" off
45
OPTIONS+=	PREF_EXT "Preferences in database not in files" off
44
OPTIONS+=	DAEMON "Daemonize dspam; speaks LMTP or DLMTP" on
46
OPTIONS+=	DAEMON "Daemonize dspam; speaks LMTP or DLMTP" on
45
46
## algorithm options
47
OPTIONS+=	NEURAL_NET "Enable neural networking" off
48
49
#
47
#
50
OPTIONS+=	CLAMAV "Enable clamav support" on
48
OPTIONS+=	CLAMAV "Enable clamav support" on
51
OPTIONS+=	CLAMAV_DEVEL "Enable clamav support" off
49
OPTIONS+=	CLAMAV_DEVEL "Enable clamav support" off
Lines 87-94 Link Here
87
OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
85
OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
88
86
89
OPTIONS+=	CGI "Install CGI (pulls in apache)" off
87
OPTIONS+=	CGI "Install CGI (pulls in apache)" off
90
OPTIONS+=	TRAIN_SCRIPT "Install trainning script (needs perl)" off
91
88
89
USE_PERL5=	yes
92
USE_AUTOTOOLS=	libtool:15
90
USE_AUTOTOOLS=	libtool:15
93
INSTALLS_SHLIB=	yes
91
INSTALLS_SHLIB=	yes
94
GNU_CONFIGURE=	yes
92
GNU_CONFIGURE=	yes
Lines 163-180 Link Here
163
161
164
.ifdef(WITH_DAEMON)
162
.ifdef(WITH_DAEMON)
165
CONFIGURE_ARGS+=	--enable-daemon
163
CONFIGURE_ARGS+=	--enable-daemon
166
RC_SUFX=	.sh
164
USE_RC_SUBR=	${PORTNAME}
167
USE_RC_SUBR=	${PORTNAME}${RC_SUFX}
168
_SED_SCRIPT+=	-e 's,%%DAEMON%%,,g'
165
_SED_SCRIPT+=	-e 's,%%DAEMON%%,,g'
169
SUB_LIST+=	DSPAM_HOME=${DSPAM_HOME}
166
SUB_LIST+=	DSPAM_HOME=${DSPAM_HOME}
170
.else
167
.else
171
_SED_SCRIPT+=	-e '/%%DAEMON%%/D'
168
_SED_SCRIPT+=	-e '/%%DAEMON%%/D'
172
.endif
169
.endif
173
170
174
.ifdef(WITH_NEURAL_NET)
175
CONFIGURE_ARGS+=	--enable-neural-networking
176
.endif
177
178
.ifdef(WITH_CLAMAV) && defined(WITH_CLAMAV_LOCAL)
171
.ifdef(WITH_CLAMAV) && defined(WITH_CLAMAV_LOCAL)
179
CONFIGURE_ARGS+=	--enable-clamav
172
CONFIGURE_ARGS+=	--enable-clamav
180
RUN_DEPENDS+=	clamav>=0:${PORTSDIR}/security/clamav
173
RUN_DEPENDS+=	clamav>=0:${PORTSDIR}/security/clamav
Lines 422-436 Link Here
422
_SED_SCRIPT+=	-e '/%%CGI%%/D'
415
_SED_SCRIPT+=	-e '/%%CGI%%/D'
423
.endif
416
.endif
424
417
425
.ifdef(WITH_TRAIN_SCRIPT)
426
USE_PERL5=	yes
427
PLIST_SUB+=	TRAIN_SCRIPT=""
428
.else
429
PLIST_SUB+=	TRAIN_SCRIPT="@comment "
430
.endif
431
432
MAN1=	dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \
418
MAN1=	dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \
433
	dspam_stats.1
419
	dspam_stats.1 dspam_train.1
434
MAN3=	libdspam.3
420
MAN3=	libdspam.3
435
MLINKS=		libdspam.3 dspam_init.3
421
MLINKS=		libdspam.3 dspam_init.3
436
MLINKS+=	libdspam.3 dspam_create.3
422
MLINKS+=	libdspam.3 dspam_create.3
Lines 446-466 Link Here
446
	pgsql_drv.txt pop3filter.txt postfix.txt qmail.txt relay.txt \
432
	pgsql_drv.txt pop3filter.txt postfix.txt qmail.txt relay.txt \
447
	sendmail.txt sqlite_drv.txt
433
	sendmail.txt sqlite_drv.txt
448
434
449
.ifndef(MAINT)
450
pre-everything::
435
pre-everything::
436
.ifndef(MAINT)
451
	@${ECHO_CMD} ""
437
	@${ECHO_CMD} ""
452
	@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:"
438
	@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:"
453
	@${GREP} -B 1 -A ${_UPD_LINE_NO} ${PKGNAME} ${FILESDIR}/UPDATING
439
	@${GREP} -B 1 -A ${_UPD_LINE_NO} ${PKGNAME} ${FILESDIR}/UPDATING
454
	@${ECHO_CMD} ""
440
	@${ECHO_CMD} ""
455
	@sleep 5
441
	@sleep 5
456
.else # maintainer only
457
post-fetch:
458
.	ifndef(STOP)
459
#.		include "/root/ports/upd"
460
.	endif
461
.endif
442
.endif
462
443
463
pre-extract: check-options-version
444
pre-extract:	check-options-version
445
.ifndef(MAINT)
464
	@${ECHO_CMD} ""
446
	@${ECHO_CMD} ""
465
	@${ECHO_CMD} "Define vars below before make-ing if you need:"
447
	@${ECHO_CMD} "Define vars below before make-ing if you need:"
466
	@${ECHO_CMD} ""
448
	@${ECHO_CMD} ""
Lines 480-485 Link Here
480
.	endif
462
.	endif
481
	@${ECHO_CMD} ""
463
	@${ECHO_CMD} ""
482
	@sleep 5
464
	@sleep 5
465
.endif
483
466
484
post-patch:
467
post-patch:
485
	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
468
	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
Lines 494-503 Link Here
494
		${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
477
		${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
495
	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \
478
	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \
496
		 ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
479
		 ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
497
480
	@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl
498
.ifdef(WITH_TRAIN_SCRIPT)
499
	 @${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl
500
.endif
501
481
502
pre-configure:
482
pre-configure:
503
	@${ECHO_CMD}
483
	@${ECHO_CMD}
Lines 511-521 Link Here
511
	@${ECHO_CMD} "You need to enable at least one database back-end."
491
	@${ECHO_CMD} "You need to enable at least one database back-end."
512
	@${FALSE}
492
	@${FALSE}
513
.endif
493
.endif
514
.if defined(WITH_NEURAL_NET) && \
515
	!( defined(USE_MYSQL) || defined(WITH_POSTGRESQL) )
516
	@${ECHO_CMD} "You need MySQL or POSTGRESQL to use neural networking."
517
	@${FALSE}
518
.endif
519
.if defined(WITH_VIRT_USERS) && !(defined(USE_MYSQL) || \
494
.if defined(WITH_VIRT_USERS) && !(defined(USE_MYSQL) || \
520
	defined(WITH_POSTGRESQL) || defined(WITH_ORACLE) || defined(WITH_HASH) )
495
	defined(WITH_POSTGRESQL) || defined(WITH_ORACLE) || defined(WITH_HASH) )
521
	@${ECHO_CMD} "You need MySQL, POSTGRESQL or ORACLE for virtual users."
496
	@${ECHO_CMD} "You need MySQL, POSTGRESQL or ORACLE for virtual users."
Lines 568-574 Link Here
568
		${INSTALL_DATA} mysql_objects-4.1.sql \
543
		${INSTALL_DATA} mysql_objects-4.1.sql \
569
			mysql_objects-space.sql \
544
			mysql_objects-space.sql \
570
			mysql_objects-speed.sql \
545
			mysql_objects-speed.sql \
571
			neural.sql \
572
			purge-4.1.sql purge.sql \
546
			purge-4.1.sql purge.sql \
573
			virtual_user_aliases.sql \
547
			virtual_user_aliases.sql \
574
			virtual_users.sql ${EXAMPLESDIR}/mysql
548
			virtual_users.sql ${EXAMPLESDIR}/mysql
Lines 606-616 Link Here
606
		${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
580
		${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
607
	${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
581
	${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
608
		${INSTALL_DATA} *.html ${CGI_PATH}/templates/
582
		${INSTALL_DATA} *.html ${CGI_PATH}/templates/
609
.endif
610
611
.ifdef(WITH_TRAIN_SCRIPT)
612
	cd ${WRKSRC}/scripts && \
613
		${INSTALL_SCRIPT} train.pl ${PREFIX}/bin/dspam_train
614
.endif
583
.endif
615
584
616
	@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD
585
	@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (dspam-3.6.3.tar.gz) = db1aedb9677e6bf5c7a47a72d4f130e5
1
MD5 (dspam-3.6.4.tar.gz) = e5e5d4beeea8d067aee9ad373c20cb22
2
SHA256 (dspam-3.6.3.tar.gz) = 6283c067c192f589a4fb925b845ba1bd9b51fe1b3df93d7f03897d7617a4aa7a
2
SHA256 (dspam-3.6.4.tar.gz) = 86868379d4f7ad4be8d039c9d8610739e7701f5602d0f67a3a7a059ea6865f16
3
SIZE (dspam-3.6.3.tar.gz) = 740097
3
SIZE (dspam-3.6.4.tar.gz) = 743467
(-)pkg-message (-2 / +2 lines)
Lines 8-15 Link Here
8
 uname -a, dspam --version, %%_VAR_DIR%%/db/ports/%%PORTNAME%%/options, MTA setup.
8
 uname -a, dspam --version, %%_VAR_DIR%%/db/ports/%%PORTNAME%%/options, MTA setup.
9
9
10
Asking about updates or telling me there is one: not only I am active on the
10
Asking about updates or telling me there is one: not only I am active on the
11
mailing lists but I also track dspam cvs so I already know; either there is a
11
mailing lists and IRC but I also track dspam CVS so I already know; either there
12
problem with the new version or I didn't have enough time to patch the port
12
is a problem with the new version or I didn't have enough time to patch the port
13
and _test_ the new version; please report your succes/failure if you run the
13
and _test_ the new version; please report your succes/failure if you run the
14
new version or the cvs version.
14
new version or the cvs version.
15
15
(-)pkg-plist (-5 / +2 lines)
Lines 15-21 Link Here
15
bin/dspam_merge
15
bin/dspam_merge
16
%%PGSQL%%bin/dspam_pg2int8
16
%%PGSQL%%bin/dspam_pg2int8
17
bin/dspam_stats
17
bin/dspam_stats
18
%%TRAIN_SCRIPT%%bin/dspam_train
18
bin/dspam_train
19
@unexec if cmp -s %D/etc/dspam.conf %D/etc/dspam.conf.sample; then rm -f %D/etc/dspam.conf; fi
19
@unexec if cmp -s %D/etc/dspam.conf %D/etc/dspam.conf.sample; then rm -f %D/etc/dspam.conf; fi
20
etc/dspam.conf.sample
20
etc/dspam.conf.sample
21
include/dspam/buffer.h
21
include/dspam/buffer.h
Lines 69-90 Link Here
69
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-4.1.sql
69
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-4.1.sql
70
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-space.sql
70
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-space.sql
71
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-speed.sql
71
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-speed.sql
72
%%MYSQL%%%%EXAMPLESDIR%%/mysql/neural.sql
73
%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge-4.1.sql
72
%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge-4.1.sql
74
%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge.sql
73
%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge.sql
75
%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_user_aliases.sql
74
%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_user_aliases.sql
76
%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_users.sql
75
%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_users.sql
77
%%MYSQL%%@dirrm %%EXAMPLESDIR%%/mysql
76
%%MYSQL%%@dirrm %%EXAMPLESDIR%%/mysql
78
%%MYSQL%%@dirrm %%EXAMPLESDIR%%
79
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/pgsql_objects.sql
77
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/pgsql_objects.sql
80
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/purge.sql
78
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/purge.sql
81
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/virtual_users.sql
79
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/virtual_users.sql
82
%%PGSQL%%@dirrm %%EXAMPLESDIR%%/pgsql
80
%%PGSQL%%@dirrm %%EXAMPLESDIR%%/pgsql
83
%%PGSQL%%@dirrm %%EXAMPLESDIR%%
84
%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge-2.sql
81
%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge-2.sql
85
%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge-3.sql
82
%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge-3.sql
86
%%SQLITE%%@dirrm %%EXAMPLESDIR%%/sqlite
83
%%SQLITE%%@dirrm %%EXAMPLESDIR%%/sqlite
87
%%SQLITE%%@dirrm %%EXAMPLESDIR%%
84
@dirrmtry %%EXAMPLESDIR%%
88
%%CGI%%www/vhosts/dspam/admins.sample
85
%%CGI%%www/vhosts/dspam/admins.sample
89
%%CGI%%www/vhosts/dspam/admin.cgi
86
%%CGI%%www/vhosts/dspam/admin.cgi
90
%%CGI%%www/vhosts/dspam/admingraph.cgi
87
%%CGI%%www/vhosts/dspam/admingraph.cgi
(-)files/UPDATING (+40 lines)
Lines 17-22 Link Here
17
make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
17
make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
18
18
19
###########################################################################
19
###########################################################################
20
# dspam-3.6.4
21
#
22
23
BugFixes:
24
- accuracy fixes (esp. for FP dspam is much better that in 3.6.3 release)
25
- safeguards for segfault when strange clamav behavior
26
- for no output when using --classify in client/server mode
27
- LOG_WARNING if truncating MySQL user/pass + plus othersmall fixes
28
29
New features:
30
- dspam_train: a true training and testing mechanism, useful for building
31
pretrained databases or training a user with their own corpus. also provides
32
a test jig for measuring efficiency/accuracy with a corpus over a
33
configuration; support for training using an index file to define the order
34
of ham/spam
35
- DeliveryHost for delivery to different hosts based on domain
36
- ClassAlias options, useful if classifying things other than spam
37
- WebUI: undo option for retraining
38
- WebUI: support for existing storeFragments option to recall message in
39
history
40
- WebUI: mass-retraining option
41
- Documentation: of all user preferences in the README
42
43
Changed features:
44
- dspam-statrs: changed names; now displays TP (true positives),
45
TN (true negatives), FN (false negatives), and FP (false positives),
46
OCA (Overall Accuracy)
47
- dspam_corpus now uses default settings for features and training modes,
48
instead of its own and now requires --spam or --nonspam arguments
49
- the trainining buffer (Feature tb=n in dspam.conf) is now offby default
50
- dspam.conf: HashRec sizes prime numbers for better spread
51
- no signature on classify
52
- ignore X-DSPAM-* in tokenizer code
53
54
Removed features:
55
- removed neural networking (NEURAL_NET), which was experimental, needed a
56
rewrite, had no support and high maintenance
57
58
59
###########################################################################
20
# dspam-3.6.3
60
# dspam-3.6.3
21
#
61
#
22
62
(-)files/dspam.in (+42 lines)
Added Link Here
1
#!/bin/sh
2
# $FreeBSD: ports/mail/dspam/files/dspam.sh.in,v 1.5 2006/02/10 17:06:24 garga Exp $
3
# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $
4
# $Tecnik: ports/mail/dspam/files/dspam.sh.in,v 1.6 2006/02/09 19:14:29 itetcu Exp $
5
#
6
7
# PROVIDE: dspam
8
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
9
# BEFORE: mail
10
# KEYWORD: shutdown
11
12
#
13
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
14
#
15
# dspam_enable="YES"
16
# you can also set the pid file via dspam_pidfile
17
#
18
19
. %%RC_SUBR%%
20
21
name=dspam
22
rcvar=`set_rcvar`
23
24
load_rc_config $name
25
26
27
: ${dspam_enable="NO"}
28
: ${dspam_pidfile:-/var/run/dspam.pid}
29
30
command=%%PREFIX%%/bin/${name}
31
command_args="--daemon  > /dev/null 2>&1 &"
32
required_dirs=%%DSPAM_HOME%%
33
required_files=%%PREFIX%%/etc/${name}.conf
34
35
extra_commands=reload
36
37
reload()
38
{
39
 kill -HUP `cat $pidfile`
40
}
41
42
run_rc_command "$1"
(-)files/dspam.sh.in (-42 lines)
Removed Link Here
1
#!/bin/sh
2
# $FreeBSD: ports/mail/dspam/files/dspam.sh.in,v 1.5 2006/02/10 17:06:24 garga Exp $
3
# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $
4
# $Tecnik: ports/mail/dspam/files/dspam.sh.in,v 1.6 2006/02/09 19:14:29 itetcu Exp $
5
#
6
7
# PROVIDE: dspam
8
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
9
# BEFORE: mail
10
# KEYWORD: shutdown
11
12
#
13
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
14
#
15
# dspam_enable="YES"
16
# you can also set the pid file via dspam_pidfile
17
#
18
19
. %%RC_SUBR%%
20
21
name=dspam
22
rcvar=`set_rcvar`
23
24
load_rc_config $name
25
26
27
: ${dspam_enable="NO"}
28
: ${dspam_pidfile:-/var/run/dspam.pid}
29
30
command=%%PREFIX%%/bin/${name}
31
command_args="--daemon  > /dev/null 2>&1 &"
32
required_dirs=%%DSPAM_HOME%%
33
required_files=%%PREFIX%%/etc/${name}.conf
34
35
extra_commands=reload
36
37
reload()
38
{
39
 kill -HUP `cat $pidfile`
40
}
41
42
run_rc_command "$1"

Return to bug 93361