View | Details | Raw Unified | Return to bug 193693 | Differences between
and this patch

Collapse All | Expand All

(-)b/mail/dspam/Makefile (-59 / +67 lines)
Lines 6-22 Link Here
6
# Thanks.
6
# Thanks.
7
7
8
PORTNAME=	dspam
8
PORTNAME=	dspam
9
PORTVERSION=	3.9.0
9
PORTVERSION=	3.10.2
10
PORTREVISION=	8
10
PORTREVISION=	0
11
CATEGORIES=	mail
11
CATEGORIES=	mail
12
MASTER_SITES=	SF \
12
MASTER_SITES=	SF 
13
		http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/
14
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
13
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
15
14
16
MAINTAINER=	danny@dannywarren.com
15
MAINTAINER=	danny@dannywarren.com
17
COMMENT=	Bayesian spam filter
16
COMMENT=	Bayesian spam filter
18
17
19
MIN_OPTIONS_VER=	${PORTNAME}-3.9.0
18
LICENSE=	AGPLv3
19
20
OPTIONS_SUB=	yes
20
21
21
OPTIONS_DEFINE=	SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \
22
OPTIONS_DEFINE=	SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \
22
		CLAMAV CLAMAV_LOCAL EXTERNAL_LOOKUP \
23
		CLAMAV CLAMAV_LOCAL EXTERNAL_LOOKUP \
Lines 24-51 OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \ Link Here
24
		LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \
25
		LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \
25
		QMAIL WEBUI LIGHTTPD DOCS EXAMPLES
26
		QMAIL WEBUI LIGHTTPD DOCS EXAMPLES
26
27
27
OPTIONS_MULTI=	DB
28
OPTIONS_MULTI=		DB
28
OPTIONS_MULTI_DB=	HASH MYSQL MYSQL_COMPRESS MYSQL_LOCAL \
29
OPTIONS_MULTI_DB=	HASH MYSQL MYSQL_COMPRESS MYSQL_LOCAL \
29
			PGSQL PGSQL_LOCAL SQLITE2 SQLITE3
30
			PGSQL PGSQL_LOCAL SQLITE2 SQLITE3
30
31
31
OPTIONS_RADIO=	LDA
32
OPTIONS_RADIO=		LDA
32
OPTIONS_RADIO_LDA=	CYRUS23 CYRUS24 DOVECOT1 \
33
OPTIONS_RADIO_LDA=	CYRUS23 CYRUS24 DOVECOT1 \
33
		DOVECOT2 EXIM MAILDROP PROCMAIL SAFECAT SENDMAIL
34
			DOVECOT2 EXIM MAILDROP PROCMAIL SAFECAT SENDMAIL
35
36
OPTIONS_DEFAULT=	SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \
37
			HASH MYSQL MYSQL_COMPRESS PGSQL SQLITE3
34
38
35
VERBOSE_DEBUG_DESC=	Debug in LOGDIR/dspam.debug
39
VERBOSE_DEBUG_DESC=	Debug in LOGDIR/dspam.debug
36
BNR_DEBUG_DESC=	Debug for BNR
40
BNR_DEBUG_DESC=		Debug for Bayesian Noise Reduction
37
PREF_EXT_DESC=	Preferences in database not in files
41
PREF_EXT_DESC=		Preferences in database not in files
38
DAEMON_DESC=	Daemonize dspam; speaks LMTP or DLMTP
42
DAEMON_DESC=		Daemonize dspam; speaks LMTP or DLMTP
39
CLAMAV_DESC=	ClamAV support
43
CLAMAV_DESC=		ClamAV support
40
CLAMAV_LOCAL_DESC=	RUN_DEPEND on selected ClamAV
44
CLAMAV_LOCAL_DESC=	RUN_DEPEND on ClamAV
41
MYSQL_DESC=	MySQL 5.X.x as back-end
45
MYSQL_DESC=		MySQL 5.X.x as back-end
42
MYSQL_COMPRESS_DESC=	Compress dspam <--> MySQL
46
MYSQL_COMPRESS_DESC=	Compress dspam <--> MySQL
43
MYSQL_LOCAL_DESC=	RUN_DEPEND on MySQL server
47
MYSQL_LOCAL_DESC=	RUN_DEPEND on MySQL server
44
PGSQL_DESC=	PostgreSQL as back-end
48
PGSQL_DESC=		PostgreSQL as back-end
45
PGSQL_LOCAL_DESC=	RUN_DEPEND on PostgreSQL server
49
PGSQL_LOCAL_DESC=	RUN_DEPEND on PostgreSQL server
46
SQLITE2_DESC=	SQLite v2.x as back-end
50
SQLITE2_DESC=		SQLite v2.x as back-end
47
SQLITE3_DESC=	SQLite v3.x as back-end
51
SQLITE3_DESC=		SQLite v3.x as back-end
48
HASH_DESC=	Hash driver
52
HASH_DESC=		Hash driver
49
EXTERNAL_LOOKUP_DESC=	RCPT verification via extlookup
53
EXTERNAL_LOOKUP_DESC=	RCPT verification via extlookup
50
USER_HOMEDIR_DESC=	Store user data in ~/.dspam
54
USER_HOMEDIR_DESC=	Store user data in ~/.dspam
51
TRUSTED_USERS_DESC=	Disable trusted user security
55
TRUSTED_USERS_DESC=	Disable trusted user security
Lines 53-74 VIRT_USERS_DESC= Virtual users (needs SQL back-end) Link Here
53
LONG_USERNAMES_DESC=	Usernames longer that OS supports
57
LONG_USERNAMES_DESC=	Usernames longer that OS supports
54
LARGE_SCALE_DESC=	File structure for large scale
58
LARGE_SCALE_DESC=	File structure for large scale
55
DOMAIN_SCALE_DESC=	File structure for multiple domains
59
DOMAIN_SCALE_DESC=	File structure for multiple domains
56
CYRUS23_DESC=	Cyrus's 2.3 deliver as LDA
60
CYRUS23_DESC=		Cyrus's 2.3 deliver as LDA
57
CYRUS24_DESC=	Cyrus's 2.4 deliver as LDA
61
CYRUS24_DESC=		Cyrus's 2.4 deliver as LDA
58
DOVECOT1_DESC=	Dovecot 1.2 deliver as LDA
62
DOVECOT1_DESC=		Dovecot 1.2 deliver as LDA
59
DOVECOT2_DESC=	Dovecot 2.2 dovecot-lda as LDA
63
DOVECOT2_DESC=		Dovecot 2.2 dovecot-lda as LDA
60
EXIM_DESC=	Exim as local delivery agent
64
EXIM_DESC=		Exim as local delivery agent
61
MAILDROP_DESC=	Maildrop as local delivery agent
65
MAILDROP_DESC=		Maildrop as local delivery agent
62
PROCMAIL_DESC=	Procmail as local delivery agent
66
PROCMAIL_DESC=		Procmail as local delivery agent
63
SAFECAT_DESC=	Safecat as local delivery agent
67
SAFECAT_DESC=		Safecat as local delivery agent
64
SENDMAIL_DESC=	Sendmail as local delivery agent
68
SENDMAIL_DESC=		Sendmail as local delivery agent
65
NICESENDMAIL_DESC=	Play nice with sendmail server
69
NICESENDMAIL_DESC=	Play nice with sendmail server
66
POSTFIX_MBC_DESC=	Dspam as mailbox_command in Postfix
70
POSTFIX_MBC_DESC=	Dspam as mailbox_command in Postfix
67
QMAIL_DESC=	Play nice with Qmail mail server
71
QMAIL_DESC=		Play nice with Qmail mail server
68
WEBUI_DESC=	Install WebUI, pulls in Apache or see below
72
WEBUI_DESC=		Install WebUI (RUN_DEPEND on Apache/Lighttpd)
69
73
LIGHTTPD_DESC=		RUN_DEPEND on Lighttpd instead of Apache
70
OPTIONS_DEFAULT=	SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \
71
			HASH MYSQL MYSQL_COMPRESS PGSQL SQLITE3
72
74
73
MAKE_JOBS_UNSAFE=	yes
75
MAKE_JOBS_UNSAFE=	yes
74
USES=		perl5 libtool shebangfix
76
USES=		perl5 libtool shebangfix
Lines 78-91 CPPFLAGS+= -I${LOCALBASE}/include Link Here
78
LDFLAGS+=	-L${LOCALBASE}/lib
80
LDFLAGS+=	-L${LOCALBASE}/lib
79
81
80
SHEBANG_FILES=	src/tools/dspam_logrotate \
82
SHEBANG_FILES=	src/tools/dspam_logrotate \
81
		src/tools/dspam_notify.pl \
83
		src/tools/dspam_notify.in \
82
		src/tools/dspam_train.in \
84
		src/tools/dspam_train.in \
83
		webui/cgi-bin/templates/de/strings.pl \
85
		webui/cgi-bin/templates/*/strings.pl \
84
		webui/cgi-bin/templates/strings.pl \
86
		webui/cgi-bin/templates/strings.pl \
85
		webui/cgi-bin/templates/fr/strings.pl \
87
		webui/cgi-bin/*.cgi \
86
		webui/cgi-bin/templates/es-es/strings.pl \
88
		webui/cgi-bin/*.pl
87
		webui/cgi-bin/templates/pt-br/strings.pl \
88
		webui/cgi-bin/*.cgi
89
89
90
.ifdef(GDBS)
90
.ifdef(GDBS)
91
CFLAGS+=	-g -DDEBUG
91
CFLAGS+=	-g -DDEBUG
Lines 112-122 DSPAM_HOME_OWNER?= ${DSPAM_OWNER} Link Here
112
DSPAM_HOME_GROUP?=	${DSPAM_GROUP}
112
DSPAM_HOME_GROUP?=	${DSPAM_GROUP}
113
DSPAM_HOME_MODE?=	0770
113
DSPAM_HOME_MODE?=	0770
114
114
115
.for s in OWNER GROUP HOME_OWNER HOME_GROUP
115
PLIST_SUB+=	DSPAM_HOME=${DSPAM_HOME} \
116
PLIST_SUB+=	DSPAM_$s=${DSPAM_$s}
116
		DSPAM_OWNER=${DSPAM_OWNER} \
117
.endfor
117
		DSPAM_GROUP=${DSPAM_GROUP} \
118
118
		DSPAM_MODE=${DSPAM_MODE} \
119
.include <bsd.port.pre.mk>
119
		DSPAM_HOME_OWNER=${DSPAM_HOME_OWNER} \
120
		DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP} \
121
		DSPAM_HOME_MODE=${DSPAM_HOME_MODE}
120
122
121
CONFIGURE_ARGS+=	--sysconfdir=${DSPAM_ETC}
123
CONFIGURE_ARGS+=	--sysconfdir=${DSPAM_ETC}
122
CONFIGURE_ARGS+=	--with-logdir=${LOG_DIR}
124
CONFIGURE_ARGS+=	--with-logdir=${LOG_DIR}
Lines 126-144 CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME} Link Here
126
CONFIGURE_ARGS+=	--with-dspam-home-owner=${DSPAM_HOME_OWNER}
128
CONFIGURE_ARGS+=	--with-dspam-home-owner=${DSPAM_HOME_OWNER}
127
CONFIGURE_ARGS+=	--with-dspam-home-group=${DSPAM_HOME_GROUP}
129
CONFIGURE_ARGS+=	--with-dspam-home-group=${DSPAM_HOME_GROUP}
128
CONFIGURE_ARGS+=	--with-dspam-home-mode=${DSPAM_HOME_MODE}
130
CONFIGURE_ARGS+=	--with-dspam-home-mode=${DSPAM_HOME_MODE}
129
PLIST_SUB+=	DSPAM_HOME=${DSPAM_HOME}
131
PLIST_SUB+=	DSPAM_HOME=${DSPAM_HOME} \
132
		DSPAM_HOME_OWNER=${DSPAM_HOME_OWNER} \
133
		DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP} \
134
		DSPAM_HOME_MODE=${DSPAM_HOME_MODE}
130
135
131
CONFIGURE_ARGS+=	--with-dspam-owner=${DSPAM_OWNER}
136
CONFIGURE_ARGS+=	--with-dspam-owner=${DSPAM_OWNER}
132
CONFIGURE_ARGS+=	--with-dspam-group=${DSPAM_GROUP}
137
CONFIGURE_ARGS+=	--with-dspam-group=${DSPAM_GROUP}
133
# we set DSPAM_MODE at the end as some LDAs want specific mode
138
# we set DSPAM_MODE at the end as some LDAs want specific mode
139
PLIST_SUB+=	DSPAM_OWNER=${DSPAM_OWNER} \
140
		DSPAM_GROUP=${DSPAM_GROUP} \
141
		DSPAM_MODE=${DSPAM_MODE} 
134
142
135
_SED_SCRIPT=	-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
143
_SED_SCRIPT=	-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
136
		-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
144
		-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
137
		-e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g' \
145
		-e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g' \
138
		-e 's,%%PORTNAME%%,${PORTNAME},g' \
146
		-e 's,%%PORTNAME%%,${PORTNAME},g' \
139
		-e 's,%%_VAR_DIR%%,${_VAR_DIR},g' \
147
		-e 's,%%_VAR_DIR%%,${_VAR_DIR},g' \
140
		-e '/^%%FreeBSD/D' \
148
		-e '/^%%FreeBSD/D'
141
		-e '/^%%Tecnik%%/D'
149
150
.include <bsd.port.options.mk>
142
151
143
.if ${PORT_OPTIONS:MSYSLOG}
152
.if ${PORT_OPTIONS:MSYSLOG}
144
CONFIGURE_ARGS+=	--enable-syslog
153
CONFIGURE_ARGS+=	--enable-syslog
Lines 182-188 SUB_LIST+= CLAMD= Link Here
182
.	endif
191
.	endif
183
.endif
192
.endif
184
193
185
# we need to know if we are building statically or dynamicaly for the plist
194
# we need to know if we are building statically or dynamically for the plist
186
_DBDRV_COUNT=	# blank, but defined so we can check against it
195
_DBDRV_COUNT=	# blank, but defined so we can check against it
187
_DBDRV=		pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv,
196
_DBDRV=		pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv,
188
197
Lines 267-275 PLIST_SUB+= DYNAMIC="@comment " Link Here
267
.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP}
276
.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP}
268
CONFIGURE_ARGS+=	--enable-external-lookup
277
CONFIGURE_ARGS+=	--enable-external-lookup
269
USE_OPENLDAP=	YES
278
USE_OPENLDAP=	YES
270
#CPPFLAGS+=	-I${LOCALBASE}/include
271
#LDFLAGS+=	-lldap -llber
272
#CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
273
.endif
279
.endif
274
280
275
.if ${PORT_OPTIONS:MUSER_HOMEDIR}
281
.if ${PORT_OPTIONS:MUSER_HOMEDIR}
Lines 395-403 pre-everything:: Link Here
395
	@${ECHO_CMD} ""
401
	@${ECHO_CMD} ""
396
	@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:"
402
	@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:"
397
	@${ECHO_CMD} "###########################################################################"
403
	@${ECHO_CMD} "###########################################################################"
398
	@${SED} -n < ${FILESDIR}/UPDATING "/^# ${PKGNAME}/,/^#####/p"
404
	@${SED} -n < ${FILESDIR}/UPDATING "/^# ${PORTNAME}-${PORTVERSION}/,/^#####/p"
399
	@${ECHO_CMD} ""
405
	@${ECHO_CMD} ""
400
	@sleep 5
401
.endif
406
.endif
402
407
403
pre-extract:
408
pre-extract:
Lines 424-430 pre-extract: Link Here
424
		@${ECHO_CMD} "${WWWDIR}"
429
		@${ECHO_CMD} "${WWWDIR}"
425
.	endif
430
.	endif
426
	@${ECHO_CMD} ""
431
	@${ECHO_CMD} ""
427
	@sleep 5
428
.endif
432
.endif
429
433
430
post-patch:
434
post-patch:
Lines 438-444 post-patch: Link Here
438
		${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
442
		${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
439
	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \
443
	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \
440
		 ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
444
		 ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
441
	@${REINPLACE_CMD} -e "s|%%PERL%%|${PERL}|; s|%%DSPAM_PATH%%|${PREFIX}/bin|" ${WRKSRC}/scripts/train.pl
445
	@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^" \
446
		${WRKSRC}/src/tools/dspam_train.in \
447
		${WRKSRC}/src/tools/dspam_notify.in
442
448
443
pre-configure:
449
pre-configure:
444
.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \
450
.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \
Lines 478-486 post-install: Link Here
478
########
484
########
479
# stupid hack until I figure out where/how to patch
485
# stupid hack until I figure out where/how to patch
480
	@${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig
486
	@${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig
481
	@${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/dspam.pc \
487
	${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/dspam.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/dspam.pc
482
		${STAGEDIR}${PREFIX}/libdata/pkgconfig/dspam.pc
488
	${TEST} `ls -1 ${STAGEDIR}${PREFIX}/lib/pkgconfig | wc -l` -eq 0 && \
483
	${RM} -R ${STAGEDIR}${PREFIX}/lib/pkgconfig || true
489
		${RM} -R ${STAGEDIR}${PREFIX}/lib/pkgconfig || true
484
490
485
.if ${PORT_OPTIONS:MEXAMPLES}
491
.if ${PORT_OPTIONS:MEXAMPLES}
486
.ifdef(USE_MYSQL)
492
.ifdef(USE_MYSQL)
Lines 540-546 post-install: Link Here
540
	@cd ${FILESDIR} && ${INSTALL_DATA} UPDATING ${STAGEDIR}${DOCSDIR}/UPDATING
546
	@cd ${FILESDIR} && ${INSTALL_DATA} UPDATING ${STAGEDIR}${DOCSDIR}/UPDATING
541
.endif
547
.endif
542
548
543
	@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${DSPAM_HOME}
549
	@${MKDIR} ${STAGEDIR}${DSPAM_HOME}
544
.for _file in firstrun.txt firstspam.txt quarantinefull.txt
550
.for _file in firstrun.txt firstspam.txt quarantinefull.txt
545
	@if ! ${TEST} -e ${WRKSRC}/txt/${_file}.sample;\
551
	@if ! ${TEST} -e ${WRKSRC}/txt/${_file}.sample;\
546
	then\
552
	then\
Lines 553-556 post-install: Link Here
553
559
554
	@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${LOG_DIR}
560
	@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${LOG_DIR}
555
561
556
.include <bsd.port.post.mk>
562
	@${CAT} ${WRKSRC}/README.FreeBSD
563
564
.include <bsd.port.mk>
(-)b/mail/dspam/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (dspam-3.9.0.tar.gz) = fb2b0d0e49d44e077e665041041035c3a882d858c03265dd0955664c0fa934ae
1
SHA256 (dspam-3.10.2.tar.gz) = ae76569604021f35b741fb95198a1e611a8c64c3838661973a6cf360bba593a9
2
SIZE (dspam-3.9.0.tar.gz) = 973232
2
SIZE (dspam-3.10.2.tar.gz) = 1035054
(-)b/mail/dspam/files/UPDATING (+31 lines)
Lines 17-22 in the port directory: 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.10.2
21
#
22
23
Upstream Changes:
24
- Support for Postgresql 9.1 added
25
- Support for Postgresql <8.1 dropped (EOL)
26
- Support for MySQL 5.5 added
27
- Support for MySQL <5.0 dropped
28
- Updated license from GPLv2 to AGPLv3
29
- Bug in RSET handling during LHLO phase
30
- Location of configuration files in dspam home (/var/dspam) can be changed
31
  through dspam.conf
32
- Various fixes to the webui templates
33
- Various small bugs and memleaks
34
- Missing documentation added to tarball
35
- Many bugfixes
36
37
Port Changes:
38
- Merge mail/dspam-devel and mail/dspam (PR #193693)
39
- Update to OptionsNG
40
- Fix pidfile location discrepancy introduced in 3.10.2
41
- Port cleanup by various submitters, thanks! [1][2][3][4][5]
42
43
[1] Patch from <yds@CoolRat.org> (PR #180695, #191610)
44
[2] Patch from Radim Kolar <hsn@sendmail.cz> (PR #167289)
45
[3] Patch from Olli Hauer <ohauer@FreeBSD.org> (PR #148485)
46
[4] Patch from <mtomasek4@gmail.com> (PR #191610)
47
[5] Patch from Rene Ladan <rene@FreeBSD.org> (PR #191797)
48
49
50
###########################################################################
20
# dspam-3.9.0
51
# dspam-3.9.0
21
#
52
#
22
53
(-)b/mail/dspam/files/dspam.in (-9 / +8 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD: head/mail/dspam/files/dspam.in 340872 2014-01-24 00:14:07Z mat $
2
# $FreeBSD: head/mail/dspam/files/dspam.in 340872 2014-01-24 00:14:07Z mat $
3
# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $
4
#
3
#
5
4
6
# PROVIDE: dspam
5
# PROVIDE: dspam
Lines 26-43 load_rc_config $name Link Here
26
#defaults
25
#defaults
27
: ${dspam_enable="NO"}
26
: ${dspam_enable="NO"}
28
: ${dspam_debug="NO"}
27
: ${dspam_debug="NO"}
29
pidfile=${dspam_pidfile:-/var/run/dspam.pid}
28
: ${dspam_pidfile:-/var/run/dspam.pid}
30
29
31
command=%%PREFIX%%/bin/${name}
30
command=%%PREFIX%%/bin/${name}
32
start_precmd=dspam_checkdebug
33
required_files=%%PREFIX%%/etc/${name}.conf
34
31
32
start_precmd=dspam_checkdebug
35
extra_commands=reload
33
extra_commands=reload
36
34
37
reload()
35
required_dirs=%%DSPAM_HOME%%
38
{
36
required_files=%%PREFIX%%/etc/${name}.conf
39
 kill -HUP `cat $pidfile`
40
}
41
37
42
dspam_checkdebug()
38
dspam_checkdebug()
43
{
39
{
Lines 49-54 dspam_checkdebug() Link Here
49
	fi
45
	fi
50
}
46
}
51
47
52
required_dirs=%%DSPAM_HOME%%
48
reload()
49
{
50
 kill -HUP `cat $pidfile`
51
}
53
52
54
run_rc_command "$1"
53
run_rc_command "$1"
(-)a/mail/dspam/files/patch-scripts__train.pl (-17 lines)
Removed Link Here
1
--- ./scripts/train.pl.orig	2010-01-11 23:21:58.000000000 +0200
2
+++ ./scripts/train.pl	2010-01-17 18:52:16.000000000 +0200
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/perl
5
+#!%%PERL%%
6
 
7
 # train.pl
8
 # This tool trains a corpus of messages (a directory containing a nonspam and
9
@@ -14,7 +14,7 @@
10
 use vars qw { $USER $PATH $REPORTING_WINDOW $CORPUS $TRAINING_MODE };
11
 
12
 $REPORTING_WINDOW  = 250;			# How often to summarize
13
-$PATH              = "/usr/local/dspam/bin";	# Path to dspam binaries
14
+$PATH              = "%%DSPAM_PATH%%";		# Path to dspam binaries
15
 $TRAINING_MODE     = "teft";			# Training mode
16
 
17
 ### DO NOT CONFIGURE BELOW THIS LINE ###
(-)b/mail/dspam/files/patch-src__dspam.c (+11 lines)
Added Link Here
1
--- src/dspam.c.orig	2012-04-11 11:48:33.000000000 -0700
2
+++ src/dspam.c	2014-09-23 19:43:09.688194417 -0700
3
@@ -4194,7 +4194,7 @@
4
 
5
     pidfile = _ds_read_attribute(agent_config, "ServerPID");
6
     if ( pidfile == NULL )
7
-      pidfile = "/var/run/dspam/dspam.pid";
8
+      pidfile = "/var/run/dspam.pid";
9
 
10
     if (pidfile) {
11
       FILE *file;
(-)b/mail/dspam/files/patch-src__dspam.conf.in (-16 / +16 lines)
Lines 1-14 Link Here
1
--- ./src/dspam.conf.in.orig	2010-01-11 23:21:58.000000000 +0200
1
--- src/dspam.conf.in.orig	2014-09-18 00:33:02.874722063 -0700
2
+++ ./src/dspam.conf.in	2010-01-17 18:49:37.000000000 +0200
2
+++ src/dspam.conf.in	2014-09-18 00:41:49.434685786 -0700
3
@@ -56,6 +56,7 @@
3
@@ -56,6 +56,7 @@
4
 # necessary if you plan on allowing untrusted processing.
4
 # necessary if you plan on allowing untrusted processing.
5
 #
5
 #
6
 #UntrustedDeliveryAgent "/usr/bin/procmail -d %u"
6
 #UntrustedDeliveryAgent "/usr/bin/procmail -d %u"
7
+#QuarantineAgent "@delivery_agent@"
7
+#UntrustedDeliveryAgent "@delivery_agent@"
8
 
8
 
9
 #
9
 #
10
 # SMTP or LMTP Delivery: Alternatively, you may wish to use SMTP or LMTP 
10
 # SMTP or LMTP Delivery: Alternatively, you may wish to use SMTP or LMTP
11
@@ -330,7 +331,7 @@
11
@@ -350,7 +351,7 @@
12
 # Storage driver settings: Specific to a particular storage driver. Uncomment
12
 # Storage driver settings: Specific to a particular storage driver. Uncomment
13
 # the configuration specific to your installation, if applicable.
13
 # the configuration specific to your installation, if applicable.
14
 #
14
 #
Lines 17-23 Link Here
17
 #MySQLPort		
17
 #MySQLPort		
18
 #MySQLUser		dspam
18
 #MySQLUser		dspam
19
 #MySQLPass		changeme
19
 #MySQLPass		changeme
20
@@ -341,7 +342,7 @@
20
@@ -361,7 +362,7 @@
21
 # If you are using replication for clustering, you can also specify a separate
21
 # If you are using replication for clustering, you can also specify a separate
22
 # server to perform all writes to.
22
 # server to perform all writes to.
23
 #
23
 #
Lines 26-46 Link Here
26
 #MySQLWritePort		
26
 #MySQLWritePort		
27
 #MySQLWriteUser		dspam
27
 #MySQLWriteUser		dspam
28
 #MySQLWritePass		changeme
28
 #MySQLWritePass		changeme
29
@@ -778,6 +779,7 @@
29
@@ -406,7 +407,7 @@
30
 #ServerHost		127.0.0.1
30
 # in /var/run/postgresql/.s.PGSQL.5432 specify just the path where the socket
31
 #ServerPort		24
31
 # resits (without .s.PGSQL.5432).
32
 #ServerQueueSize	32
33
+# keep this is sync with /usr/local/etc/rc.d/dspam[.sh] rc.d script
34
 #ServerPID		/var/run/dspam.pid
35
 
32
 
36
 #
33
-#PgSQLServer		/var/run/postgresql/
37
@@ -814,14 +816,15 @@
34
+#PgSQLServer		/tmp/
35
 #PgSQLPort		
36
 #PgSQLUser		dspam
37
 #PgSQLPass		changeme
38
@@ -845,14 +846,14 @@
38
 # you are running the client and server on the same machine, as it eliminates
39
 # you are running the client and server on the same machine, as it eliminates
39
 # much of the bandwidth overhead.
40
 # much of the bandwidth overhead.
40
 #
41
 #
41
-#ServerDomainSocketPath	"/tmp/dspam.sock"
42
-#ServerDomainSocketPath	"/tmp/dspam.sock"
42
+# keep this is sync with /usr/local/etc/rc.d/dspam[.sh] rc.d script
43
+#ServerDomainSocketPath	"/var/run/dspam.sock"
43
+#ServerDomainSocketPath  "/var/run/dspam.sock"
44
 
44
 
45
 #
45
 #
46
 # Client Mode: If you are running DSPAM in client/server mode, uncomment and
46
 # Client Mode: If you are running DSPAM in client/server mode, uncomment and
(-)b/mail/dspam/pkg-descr (-1 / +1 lines)
Lines 4-7 server-side agent for UNIX email servers and a developer's library Link Here
4
for mail clients, other anti-spam tools, and similar projects
4
for mail clients, other anti-spam tools, and similar projects
5
requiring drop-in spam filtering.
5
requiring drop-in spam filtering.
6
6
7
WWW: http://dspam.nuclearelephant.com
7
WWW: http://dspam.sourceforge.net/
(-)b/mail/dspam/pkg-message (-38 / +11 lines)
Lines 1-41 Link Here
1
-------------------------------------------------------------------------------
1
---------------------------------------------------------------------------
2
 Reporting problems, asking questions:
3
 - FreeBSD specific port-related problems/questions/patches: maintainer
4
(and ports@ if you feel the need); send-pr only if you get no timely reply
5
 - dspam specific questions: dspam/dspam-dev mailing list (maintainer cc'ed)
6
 - dspam specific patches: dspam/dspam-dev mailing list (maintainer cc'ed)
7
 Please be sure to include in your email/pr relevant information such as:
8
 uname -a, dspam --version, %%_VAR_DIR%%/db/ports/%%PORTNAME%%/options, MTA setup.
9
2
10
Asking about updates or telling me there is one: there's no need, I am one of
3
%%WebUI%%  The WebUI files have been installed to:
11
the developers.
4
%%WebUI%%    %%WWWDIR%%
12
5
%%WebUI%%
13
%%WebUI%% The CGI files had been installed in
6
%%DAEMON%%  To enable the dspam deamon set dspam_enable="YES" in:
14
%%WebUI%% %%WWWDIR%%
7
%%DAEMON%%    /etc/rc.conf
15
%%WebUI%% Copy
16
%%WebUI%% %%WWWDIR%%/default.prefs.sample
17
%%WebUI%% to
18
%%WebUI%% %%WWWDIR%%/default.prefs
19
%%WebUI%% and edit it to your needs.
20
%%WebUI%% Copy
21
%%WebUI%% %%WWWDIR%%/configure.pl.sample
22
%%WebUI%% to
23
%%WebUI%% %%WWWDIR%%/configure.pl
24
%%WebUI%% and edit it to your needs.
25
%%WebUI%% If you symlink this file in %%DSPAM_HOME%%/
26
%%WebUI%% an administrator can edit these options in the DSPAM Admin Suite.
27
%%WebUI%% Define administrators by copying 
28
%%WebUI%% %%WWWDIR%%/admins.sample
29
%%WebUI%% to
30
%%WebUI%% %%WWWDIR%%/admins 
31
%%WebUI%% and edit the file to your needs. 
32
%%WebUI%% If you have problems (after upgrading) check permissions.
33
%%DAEMON%%
8
%%DAEMON%%
34
%%DAEMON%% To enable the dspam deamon put dspam_enable="YES" in your
9
  Additional setup instructions can be found at:
35
%%DAEMON%% /etc/rc.conf
10
    %%DOCSDIR%%
11
    %%EXAMPLESDIR%%
12
13
---------------------------------------------------------------------------
36
14
37
 You'll find additional setup instructions under
38
 %%DOCSDIR%%
39
and
40
 %%EXAMPLESDIR%%
41
------------------------------------------------------------------------------
(-)b/mail/dspam/pkg-plist (-15 / +37 lines)
Lines 1-8 Link Here
1
%%HASH%%bin/cssstat
2
%%HASH%%bin/csscompress
3
%%HASH%%bin/cssclean
1
%%HASH%%bin/cssclean
2
%%HASH%%bin/csscompress
4
%%HASH%%bin/cssconvert
3
%%HASH%%bin/cssconvert
4
%%HASH%%bin/cssstat
5
@owner %%DSPAM_OWNER%%
6
@group %%DSPAM_GROUP%%
7
@mode %%DSPAM_MODE%%
5
bin/dspam
8
bin/dspam
9
@exec chown %%DSPAM_OWNER%%:%%DSPAM_GROUP%% %D/%F
10
@exec chmod %%DSPAM_MODE%% %D/%F
11
@mode
12
@group wheel
13
@owner root
6
bin/dspamc
14
bin/dspamc
7
bin/dspam_2sql
15
bin/dspam_2sql
8
bin/dspam_admin
16
bin/dspam_admin
Lines 11-33 bin/dspam_crc Link Here
11
bin/dspam_dump
19
bin/dspam_dump
12
bin/dspam_logrotate
20
bin/dspam_logrotate
13
bin/dspam_merge
21
bin/dspam_merge
22
bin/dspam_notify
14
%%PGSQL%%bin/dspam_pg2int8
23
%%PGSQL%%bin/dspam_pg2int8
15
bin/dspam_stats
24
bin/dspam_stats
16
bin/dspam_train
25
bin/dspam_train
26
@mode 0640
17
@owner %%DSPAM_OWNER%%
27
@owner %%DSPAM_OWNER%%
18
@group %%DSPAM_GROUP%%
28
@group %%DSPAM_GROUP%%
19
@mode 640
20
@sample etc/dspam.conf.sample
29
@sample etc/dspam.conf.sample
30
@exec chown %%DSPAM_OWNER%%:%%DSPAM_GROUP%% %D/%F
31
@exec chmod 0640 %D/%F
32
@group wheel
33
@owner root
21
@mode
34
@mode
22
@group
23
@owner
24
include/dspam/buffer.h
35
include/dspam/buffer.h
25
include/dspam/config.h
36
include/dspam/config.h
26
include/dspam/config_shared.h
37
include/dspam/config_shared.h
27
include/dspam/decode.h
38
include/dspam/decode.h
28
include/dspam/diction.h
39
include/dspam/diction.h
29
include/dspam/error.h
40
include/dspam/error.h
30
include/dspam/external_lookup.h
31
include/dspam/heap.h
41
include/dspam/heap.h
32
include/dspam/libdspam.h
42
include/dspam/libdspam.h
33
include/dspam/libdspam_objects.h
43
include/dspam/libdspam_objects.h
Lines 41-60 lib/libdspam.so Link Here
41
lib/libdspam.so.7
51
lib/libdspam.so.7
42
lib/libdspam.so.7.0.0
52
lib/libdspam.so.7.0.0
43
man/man1/dspam.1.gz
53
man/man1/dspam.1.gz
54
man/man1/dspam_admin.1.gz
44
man/man1/dspam_clean.1.gz
55
man/man1/dspam_clean.1.gz
56
man/man1/dspam_crc.1.gz
45
man/man1/dspam_dump.1.gz
57
man/man1/dspam_dump.1.gz
58
man/man1/dspam_logrotate.1.gz
46
man/man1/dspam_merge.1.gz
59
man/man1/dspam_merge.1.gz
47
man/man1/dspam_stats.1.gz
60
man/man1/dspam_stats.1.gz
48
man/man1/dspam_train.1.gz
61
man/man1/dspam_train.1.gz
49
man/man3/libdspam.3.gz
50
man/man3/dspam_init.3.gz
51
man/man3/dspam_create.3.gz
52
man/man3/dspam_addattribute.3.gz
62
man/man3/dspam_addattribute.3.gz
53
man/man3/dspam_attach.3.gz
63
man/man3/dspam_attach.3.gz
54
man/man3/dspam_process.3.gz
64
man/man3/dspam_clearattributes.3.gz
55
man/man3/dspam_getsource.3.gz
65
man/man3/dspam_create.3.gz
56
man/man3/dspam_destroy.3.gz
66
man/man3/dspam_destroy.3.gz
57
man/man3/dspam_detach.3.gz
67
man/man3/dspam_detach.3.gz
68
man/man3/dspam_getsource.3.gz
69
man/man3/dspam_init.3.gz
70
man/man3/dspam_process.3.gz
71
man/man3/libdspam.3.gz
58
%%DYNAMIC%%%%HASH%%lib/dspam/libhash_drv.a
72
%%DYNAMIC%%%%HASH%%lib/dspam/libhash_drv.a
59
%%DYNAMIC%%%%HASH%%lib/dspam/libhash_drv.so
73
%%DYNAMIC%%%%HASH%%lib/dspam/libhash_drv.so
60
%%DYNAMIC%%%%HASH%%lib/dspam/libhash_drv.so.7
74
%%DYNAMIC%%%%HASH%%lib/dspam/libhash_drv.so.7
Lines 76-83 libdata/pkgconfig/dspam.pc Link Here
76
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
90
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
77
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
91
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
78
%%PORTDOCS%%%%DOCSDIR%%/README
92
%%PORTDOCS%%%%DOCSDIR%%/README
79
%%PORTDOCS%%%%DOCSDIR%%/RELEASE.NOTES
80
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
93
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
94
%%PORTDOCS%%%%DOCSDIR%%/RELEASE.NOTES
95
%%PORTDOCS%%%%DOCSDIR%%/UPDATING
96
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
81
%%PORTDOCS%%%%DOCSDIR%%/courier.txt
97
%%PORTDOCS%%%%DOCSDIR%%/courier.txt
82
%%PORTDOCS%%%%DOCSDIR%%/exim.txt
98
%%PORTDOCS%%%%DOCSDIR%%/exim.txt
83
%%PORTDOCS%%%%DOCSDIR%%/markov.txt
99
%%PORTDOCS%%%%DOCSDIR%%/markov.txt
Lines 89-96 libdata/pkgconfig/dspam.pc Link Here
89
%%PORTDOCS%%%%DOCSDIR%%/relay.txt
105
%%PORTDOCS%%%%DOCSDIR%%/relay.txt
90
%%PORTDOCS%%%%DOCSDIR%%/sendmail.txt
106
%%PORTDOCS%%%%DOCSDIR%%/sendmail.txt
91
%%PORTDOCS%%%%DOCSDIR%%/sqlite_drv.txt
107
%%PORTDOCS%%%%DOCSDIR%%/sqlite_drv.txt
92
%%PORTDOCS%%%%DOCSDIR%%/UPDATING
93
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
94
%%PORTDOCS%%@dirrm %%DOCSDIR%%
108
%%PORTDOCS%%@dirrm %%DOCSDIR%%
95
%%PORTEXAMPLES%%%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-4.1.sql
109
%%PORTEXAMPLES%%%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-4.1.sql
96
%%PORTEXAMPLES%%%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-space.sql
110
%%PORTEXAMPLES%%%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-space.sql
Lines 228-233 firstrun.txt.sample Link Here
228
firstspam.txt.sample
242
firstspam.txt.sample
229
quarantinefull.txt.sample
243
quarantinefull.txt.sample
230
@cwd /
244
@cwd /
231
@dirrmtry %%LOG_DIR%%
245
@owner %%DSPAM_HOME_OWNER%%
246
@group %%DSPAM_HOME_GROUP%%
247
@mode %%DSPAM_HOME_MODE%%
232
@dirrm %%DSPAM_HOME%%
248
@dirrm %%DSPAM_HOME%%
249
@mode
233
@exec chown %%DSPAM_HOME_OWNER%%:%%DSPAM_HOME_GROUP%% %%DSPAM_HOME%%
250
@exec chown %%DSPAM_HOME_OWNER%%:%%DSPAM_HOME_GROUP%% %%DSPAM_HOME%%
251
@exec chmod %%DSPAM_HOME_MODE%% %%DSPAM_HOME%%
252
@exec chown %%DSPAM_HOME_OWNER%%:%%DSPAM_HOME_GROUP%% %%LOG_DIR%%
253
@dirrmtry %%LOG_DIR%%
254
@group wheel
255
@owner root

Return to bug 193693