1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-15 07:56:36 +00:00

mail-dspam-devel: corect deinstall, package, describe; update; bugfixes; ................

After private debuging, the 25th night spent on-line with
	the author and two minor versions all to make it work on
	FreeBSD like it should, discovering some other bugs in
	proccess,

	TA DA !
	bring in the compleate daemonized version and adjust it for
	package building

	dspam-devel-3.3.4 (newer versions sigbus - threads problem)

	The daemon mode seems to be working now, so the port act like it should:
	- if enabled with WITH_DEAMON we install the rc script; to start it at
	boot put 'dspam_enable="YES"' in /etc/rc.conf and set the appropriate
	options in dspam.conf
	- read section "2.3 Client/Server Mode" from dspam README to learn how to
	use dspam in daemon mode
	- a simple portupgrade from previous versions will work with no problems
	with your current setup, even if compiled with WITH_DEAMON (default)

	- change default DB back-end to MySQL to make daemon mode work for package
	building
	- add MySQL v5.0.x support -- MYSQL50 [1]
	- USE_MYSQL and have make describe output right
	- change of name: SQLITE --> SQLITE2, as we now have sqlite3 support
	- add Sqlite v3.x support -- SQLITE3
	- add BNR_DEBUG option
	- drop QUARANTINE_AGENT as is not supported by ./configure anymore and
	set in dspam.conf UntrustedDeliveryAgent and QuarantineAgent to default to
	TrustedDeliveryAgent, but leave them commented out [2]
	- add support for exim [4] which we build with the same database back-end
	as dspam if possible
	- fix PREF_EXT and BDB4 cases as well in our Makefile
	- change default DSPAM_HOME_MODE to 0770, it's a directory, you know ;) [3]
	- DSPAM_HOME_{OWNER,GROUP} default to DSPAM_{OWNER,GROUP}
	- default maximum message size to 300KB in dspam.conf
	- correct long-standing copy/paste bug (DSPAM_{GROUP,MODE} were set to
	DSPAM_HOME_{GROUP,MODE})
	- Makefile clean-ups
	- fix deinstall to delete dspam.conf if it hasn't been customized, as
	requested by kris@ with "Ports Janitor" hat :) and save the net and myself
	some bugging mails

	[1] based on ports/74761 by Gea-Suan Lin <gslin@netnews.NCTU.edu.tw>
	[2] based on ports/75548 by Julien Gabel <jpeg@thilelli.net>
	[3] based on ports/75549 by Julien Gabel <jpeg@thilelli.net>
	[4] suggested, incorrectly, in ports/74762 by Shahbaz Javeed <sjaveed@adderpit.com>

	Note to committer: all those PR are closed.

PR:		ports/75647
Submitted by:	Ion-Mihai "IOnut" Tetcu <itetcu@people.tecnik93.com>
This commit is contained in:
Edwin Groothuis 2005-01-12 07:28:34 +00:00
parent a8fb092449
commit d4f7d5e67f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=126208
7 changed files with 341 additions and 221 deletions

View File

@ -7,28 +7,29 @@
PORTNAME= dspam-devel
PORTVERSION= ${PORTVER_MAJ}${SNAP_DATE}
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://people.tecnik93.com/~itetcu/FreeBSD/ports/dspam-devel/sources/
DISTFILES= ${PORTNAME}.${PORTVERSION}.tar.gz
DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= itetcu@people.tecnik93.com
COMMENT= Bayesian spam filter - development version
.ifdef(SNAP_DATE)
WRKSRC= ${WRKDIR}/dspam-cvs-devel${SNAP_DATE}
SNAP_DATE= .20041201.1330
PORTVER_MAJ= 3.3.0.a
.else
WRKSRC= ${WRKDIR}/dspam-${PORTVER_MAJ}
.endif
#SNAP_DATE= .20041225.1815
PORTVER_MAJ= 3.3.4
## debug / log / admin options
OPTIONS= DEBUG "Enable debugging logging" on
OPTIONS+= VERBOSE_DEBUG "Enable debug in LOGDIR/dspam.debug" off
#OPTIONS+= USER_LOGGING "Log mail in DSPAM_HOME/data/user/user.log" off
#OPTIONS+= SYSTEM_LOGGING "Log some info DSPAM_HOME/system.log" on
#OPTIONS+= SAT "Log spam source addresses to syslog" on
#OPTIONS+= PARSE_TO_HEADERS "Get user from To header on fp spam" off
OPTIONS+= BNR_DEBUG "Enable debug for BNR" off
OPTIONS+= PREF_EXT "Preferences in database not in files" off
OPTIONS+= DAEMON "Daemonize dspam; speak LMTP; EXPERIMENTAL" off
OPTIONS+= DAEMON "Daemonize dspam; speak LMTP" on
## algorithm options
OPTIONS+= GRAHAM_BAYES "Enable Graham (traditional) bayesian" on
OPTIONS+= BURTON_BAYES "Enable Burton (alternative) bayesian" on
@ -39,47 +40,43 @@ OPTIONS+= TEST_COND "More inoculous results rapidly, risk fps" on
OPTIONS+= NO_BIAS "No bias toward innocent mail" off
OPTIONS+= WHITELIST "Automatic whitelisting of ham" off
OPTIONS+= NEURAL_NET "Enable neural networking" off
## run-time configure options
#OPTIONS+= HOMEDIR_DOT "Dot files in ~/USER not DSPAM_HOME" off
OPTIONS+= USER_HOMEDIR "Store user data in ~/.dspam" off
#OPTIONS+= OPT_IN "Run only for users with .dspam" off
OPTIONS+= TRUSTED_USERS "Disable trusted user security" off
## mesage taging options
#OPTIONS+= SPAM_SUBJ "Prepends SPAM to the Subject header" off
#OPTIONS+= SIGNATURE_HEADERS "Put signatures IDs ONLY in headers" off
#OPTIONS+= WEBMAIL "Only with mail stored server-side" off
## back-end
OPTIONS+= MYSQL40 "Use MySQL 4.0.x as back-end" off
OPTIONS+= MYSQL40 "Use MySQL 4.0.x as back-end" on
OPTIONS+= MYSQL41 "Use MySQL 4.1.x as back-end" off
OPTIONS+= MYSQL50 "Use MySQL 5.0.x as back-end" off
OPTIONS+= MYSQL_COMPRESS "Compress dspam <--> MySQL" off
OPTIONS+= POSTGRESQL73 "Use PostgreSQL v.7.3 as back-end" off
OPTIONS+= POSTGRESQL74 "Use PostgreSQL v.7.4 as back-end" off
#OPTIONS+= PGSQL_INSTALLED "You have the client installed" on
OPTIONS+= ORACLE "Use Oracle as back-end (BROKEN)" off
OPTIONS+= BDB4 "Use BDB4 as back-end (not recomanded)" off
OPTIONS+= SQLITE "Use SQLite as back-end" on
OPTIONS+= SQLITE2 "Use SQLite v2.x as back-end" off
OPTIONS+= SQLITE3 "Use SQLite v3.x as back-end" off
OPTIONS+= VIRT_USERS "Enable virtual users (needs SQL back-end)" off
OPTIONS+= LONG_USERNAMES "Usernames longer that OS supports" off
OPTIONS+= LARGE_SCALE "File structure for large scale" off
OPTIONS+= DOMAIN_SCALE "File structure for multiple domains" off
#OPTIONS+= SIGNATURE_ATACH "Put server-side signature in mails" off
## MTA and LDA
OPTIONS+= MAILDROP_LDA "Use Maildrop as local delivery agent" off
OPTIONS+= PROCMAIL_LDA "Use Procmail as local delivery agent" off
OPTIONS+= CYRUS21_LDA "Use Cyrus's 2.1 deliver as LDA" off
OPTIONS+= CYRUS22_LDA "Use Cyrus's 2.2 deliver as LDA" off
OPTIONS+= EXIM_LDA "Use Exim as local delivery agent" off
OPTIONS+= MAILDROP_LDA "Use Maildrop as local delivery agent" off
OPTIONS+= PROCMAIL_LDA "Use Procmail as local delivery agent" off
OPTIONS+= SENDMAIL_LDA "Use Sendmail as local delivery agent" off
OPTIONS+= SENDMAIL "Play nice with sendmail server" off
OPTIONS+= POSTFIX_MBC "Dspam as mailbox_command in Postfix" off
OPTIONS+= QMAIL "Play nice with Qmail mail server" off
#OPTIONS+= BROKEN_ERR_CODES "99=spam, 0=not, other=error (qmailish)" off
#OPTIONS+= BROKEN_MTA "Enable if MTA pases ^M to dspam" off
OPTIONS+= CGI "Install CGI (pulls in apache)" off
USE_GNOME= pkgconfig
#USE_INC_LIBTOOL_VER=13
USE_LIBTOOL_VER=15
USE_REINPLACE= yes
INSTALLS_SHLIB= yes
@ -87,15 +84,27 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
#CFLAGS+= -g
PKGMESSAGE= ${WRKSRC}/src/README.FreeBSD
UPD_LINE_NO= 39
CONFLICTS= dspam-2* dspam-3*
SIGNATURE_LIFE?= 15
_VAR_DIR= /var
LOG_DIR?= ${_VAR_DIR}/log/dspam
DSPAM_MODE?= 4510
DSPAM_OWNER?= root
DSPAM_GROUP?= mail
DSPAM_HOME?= ${_VAR_DIR}/db/dspam
DSPAM_HOME_MODE?= 0660
DSPAM_HOME_OWNER?= ${DSPAM_OWNER}
DSPAM_HOME_GROUP?= ${DSPAM_GROUP}
DSPAM_HOME_MODE?= 0770
.include <bsd.port.pre.mk>
@ -103,27 +112,18 @@ CONFIGURE_ARGS+= --with-logdir=${LOG_DIR}
PLIST_SUB+= LOG_DIR=${LOG_DIR}
CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME}
PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME}
.if defined(DSPAM_HOME_OWNER)
CONFIGURE_ARGS+= --with-dspam-home-owner=${DSPAM_HOME_OWNER}
.endif
.if defined(DSPAM_HOME_GROUP)
CONFIGURE_ARGS+= --with-dspam-home-group=${DSPAM_HOME_GROUP}
.endif
.if defined(DSPAM_HOME_MODE)
CONFIGURE_ARGS+= --with-dspam-home-mode=${DSPAM_HOME_MODE}
.endif
PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME}
.if defined(DSPAM_OWNER)
CONFIGURE_ARGS+= --with-dspam-owner=${DSPAM_OWNER}
.endif
.if defined(DSPAM_GROUP)
CONFIGURE_ARGS+= --with-dspam-group=${DSPAM_HOME_GROUP}
.endif
.if defined(DSPAM_MODE)
CONFIGURE_ARGS+= --with-dspam-mode=${DSPAM_HOME_MODE}
CONFIGURE_ARGS+= --with-dspam-group=${DSPAM_GROUP}
.endif
# we set DSPAM_MODE at the end as some LDA whant specific mode
SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
@ -140,36 +140,30 @@ CONFIGURE_ARGS+= --enable-debug
CONFIGURE_ARGS+= --enable-verbose-debug
.endif
# conf option
#.if defined(WITH_SYSTEM_LOGGING)
#CONFIGURE_ARGS+= --enable-logging
#.else
#CONFIGURE_ARGS+= --disable-system-logging
#.endif
# conf option
#.if defined(WITH_USER_LOGGING)
#CONFIGURE_ARGS+= --enable-user-logging
#.else
#CONFIGURE_ARGS+= --disable-user-logging
#.endif
# conf
#.if defined(WITH_SAT)
#CONFIGURE_ARGS+= --enable-source-address-tracking
#.endif
# conf
#.if defined(PARSE_TO_HEADERS)
#CONFIGURE_ARGS+= --enable-parse-to-headers
#.endif
.if defined(WITH_BNR_DEBUG)
CONFIGURE_ARGS+= --enable-bnr-debug
.endif
.if defined(WITH_PREF_EXT)
CONFIGURE_ARGS+= --enable-preferences-extension
.endif
####
# quick hack to build the package with daemon
.ifndef(WITHOUT_DAEMON)
WITH_DAEMON= on
.endif
.ifdef(WITH_DAEMON)
CONFIGURE_ARGS+= --enable-daemon
RC_DIR= ${PREFIX}/etc/rc.d
RC_SUFX= .sh
PLIST_FILES+= etc/rc.d/dspam${RC_SUFX}
SED_SCRIPT+= -e 's,%%DAEMON%%,,g'
SED_RC_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g'
.else
SED_SCRIPT+= -e ',%%DAEMON%%,D'
.endif
.if !defined(WITH_GRAHAM_BAYES)
@ -208,76 +202,17 @@ CONFIGURE_ARGS+= --enable-whitelist
CONFIGURE_ARGS+= --enable-neural-networking
.endif
#.if defined(WITH_HOMEDIR_DOT)
#CONFIGURE_ARGS+= --enable-homedir-dotfiles
#.endif
.if defined(WITH_USER_HOMEDIR)
CONFIGURE_ARGS+= --enable-homedir
## XXXXXXXX
# to check incompatibility with CGI and warn user
# to install setuid root
.endif
# conf
#.if defined(WITH_OPT_IN)
#CONFIGURE_ARGS+= --enable-opt-in
#.endif
.if defined(WITH_TRUSTED_USERS)
CONFIGURE_ARGS+= --disable-trusted-user-security
.endif
# conf
#.if defined(WITH_SPAM_SUBJ)
#CONFIGURE_ARGS+= --enable-spam-subject
#.endif
# .conf option
#.if defined(WITH_SIGNATURE_HEADERS)
#CONFIGURE_ARGS+= --enable-signature-headers
#SED_SCRIPT+= -e 's,%%SIGHDR%%,,g'
#.else
#SED_SCRIPT+= -e '/%%SIGHDR%%/D'
#.endif
# not supported anymore
#.if defined(SIGNATURE_ATACH)
#CONFIGURE_ARGS+= --enable-signature-attachments
#.endif
#.if defined(WITH_WEBMAIL)
#CONFIGURE_ARGS+= --enable-webmail
#.endif
DBDRV_TOTAL_COUNT= ooooooo # 7
DBDRV_TOTAL_COUNT= ooooooooo # 9
DBDRV_COUNT= ${DBDRV_TOTAL_COUNT}
.if defined(WITH_MYSQL40)
WANT_MYSQL_VER= 40
#PKGNAMESUFFIX= -mysql40
.elseif defined(WITH_MYSQL41)
WANT_MYSQL_VER= 41
#PKGNAMESUFFIX= -mysql41
.endif
.if defined(WITH_MYSQL40) || defined(WITH_MYSQL41)
CONFIGURE_ARGS+= --with-storage-driver=mysql_drv \
--with-mysql-includes=${LOCALBASE}/include/mysql \
--with-mysql-libraries=${LOCALBASE}/lib/mysql
PLIST_SUB+= DB4="@comment "
PLIST_SUB+= MYSQL=""
PLIST_SUB+= PGSQL="@comment "
PLIST_SUB+= SQLITE="@comment "
SED_SCRIPT+= -e 's,%%MYSQL%%,,g'
SED_SCRIPT+= -e '/%%PGSQL%%/D'
SED_SCRIPT+= -e '/%%SQLITE%%/D'
DBDRV_COUNT:= ${DBDRV_COUNT:S/o//}
.if defined(WITH_MYSQL_COMPRESS)
CONFIGURE_ARGS+= --enable-client-compression
.endif
.endif
.if defined(WITH_POSTGRESQL73)
LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql73
#BUILD_DEPENDS+= ${LIB_DEPENDS}
@ -336,10 +271,17 @@ SED_SCRIPT+= -e '/%%SQLITE%%/D'
DBDRV_COUNT:= ${DBDRV_COUNT:S/o//}
.endif
.if ${DBDRV_TOTAL_COUNT}==${DBDRV_COUNT} || defined(WITH_SQLITE)
# DBDRV_COUNT==!(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) || defined(WITH_ORACLE) || defined(WITH_BDB))
WITH_SQLITE= on
.if defined(WITH_SQLITE3)
HAVE_SQLITE= yes
LIB_DEPENDS+= sqlite.3:${PORTSDIR}/databases/sqlite3
.endif
.if defined(WITH_SQLITE2)
HAVE_SQLITE= yes
LIB_DEPENDS+= sqlite.2:${PORTSDIR}/databases/sqlite2
.endif
.if defined(HAVE_SQLITE)
CONFIGURE_ARGS+= --with-storage-driver=sqlite_drv \
--with-sqlite-includes=${LOCALBASE}/include \
--with-sqlite-libraries=${LOCALBASE}/lib
@ -354,6 +296,38 @@ SED_SCRIPT+= -e 's,%%SQLITE%%,,g'
DBDRV_COUNT:= ${DBDRV_COUNT:S/o//}
.endif
.ifdef(WITH_MYSQL40)
WANT_MYSQL_VER= 40
#PKGNAMESUFFIX= -mysql40
.elifdef(WITH_MYSQL41)
WANT_MYSQL_VER= 41
#PKGNAMESUFFIX= -mysql41
.elifdef(WITH_MYSQL50)
WANT_MYSQL_VER= 50
#PKGNAMESUFFIX= -mysql50
.endif
.if defined(WITH_MYSQL40) || defined(WITH_MYSQL41) || defined(WITH_MYSQL50) || ${DBDRV_TOTAL_COUNT}==${DBDRV_COUNT}
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-storage-driver=mysql_drv \
--with-mysql-includes=${LOCALBASE}/include/mysql \
--with-mysql-libraries=${LOCALBASE}/lib/mysql
PLIST_SUB+= DB4="@comment "
PLIST_SUB+= MYSQL=""
PLIST_SUB+= PGSQL="@comment "
PLIST_SUB+= SQLITE="@comment "
SED_SCRIPT+= -e 's,%%MYSQL%%,,g'
SED_SCRIPT+= -e '/%%PGSQL%%/D'
SED_SCRIPT+= -e '/%%SQLITE%%/D'
DBDRV_COUNT:= ${DBDRV_COUNT:S/o//}
. if defined(WITH_MYSQL_COMPRESS)
CONFIGURE_ARGS+= --enable-client-compression
. endif
SED_RC_SCRIPT+= -e 's,%%MYSQL%%,mysql,g'
.else
SED_RC_SCRIPT+= -e 's,%%MYSQL%%,,'
.endif
.if defined(WITH_VIRT_USERS)
CONFIGURE_ARGS+= --enable-virtual-users
.endif
@ -369,20 +343,44 @@ CONFIGURE_ARGS+= --enable-domain-scale
.endif
# add one 'o' here for each new LDA
LDA_TOTAL_COUNT= oooooo #6
LDA_TOTAL_COUNT= ooooooo # 7
LDA_COUNT= ${LDA_TOTAL_COUNT}
.if defined(WITH_CYRUS21_LDA)
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd2
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
.if defined(WITH_CYRUS22_LDA)
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd22
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
.if defined(WITH_EXIM_LDA)
. if defined(WITH_MYSQL40) || (WITH_MYSQL41)
_EXIM_EXT= -mysql
. elseif defined(WITH_POSTGRESQL74) || defined(WITH_POSTGRESQL73)
####
### fix me for pg 7.3: how to pass the db option to exim port ?
###
_EXIM_EXT= -postgresql
. endif
RUN_DEPENDS+= exim:${PORTSDIR}/mail/exim${_EXIM_EXT}
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/sbin/exim'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
.if defined(WITH_MAILDROP_LDA)
RUN_DEPENDS+= maildrop:${PORTSDIR}/mail/maildrop
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/bin/maildrop -d $$u'
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/bin/maildrop'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
.if defined(WITH_PROCMAIL_LDA)
RUN_DEPENDS+= procmail:${PORTSDIR}/mail/procmail
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/bin/procmail -d $$u'
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/bin/procmail'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
@ -392,55 +390,27 @@ LDA_COUNT:= ${LDA_COUNT:S/o//}
.else
. if defined(WITH_SENDMAIL_LDA) && exists(${LOCALBASE}/sbin/sendmail)
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/sbin/sendmail'
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/sbin/sendmail'
LDA_COUNT:= ${LDA_COUNT:S/o//}
. endif
.endif
.if defined(WITH_CYRUS21_LDA)
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd2
#CONFIGURE_ARGS+=\
#--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver -e -r $${sender} -m $${extension} $${user} $$u'
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
.if defined(WITH_CYRUS22_LDA)
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd22
#CONFIGURE_ARGS+=\
#--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver -e -r $${sender} -m $${extension} $${user} $$u'
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
LDA_COUNT:= ${LDA_COUNT:S/o//}
.endif
.if defined(WITH_SENDMAIL)
CONFIGURE_ARGS+= --with-dspam-mode=4511
DSPAM_MODE= 4511
.endif
.if defined(WITH_POSTFIX_MBC)
CONFIGURE_ARGS+= --with-dspam-mode=4511
DSPAM_MODE= 4511
SED_SCRIPT+= -e 's,%%POSTFIX_MBC%%,,g'
.else
SED_SCRIPT+= -e '/%%POSTFIX_MBC%%/D'
.endif
.if defined(WITH_QMAIL)
CONFIGURE_ARGS+= --with-dspam-mode=4511
DSPAM_MODE= 4511
.endif
# conf
#.if defined(WITH_BROKEN_ERR_CODES)
#CONFIGURE_ARGS+= --enable-broken-return-codes
#.endif
# conf
#.if defined(WITH_BROKEN_MTA)
#CONFIGURE_ARGS+= --enable-broken-mta
#.endif
# conf option
.if defined(QUARANTINE_AGENT)
CONFIGURE_ARGS+= --with-quarantine-agent=${QUARANTINE_AGENT}
.if defined(DSPAM_MODE)
CONFIGURE_ARGS+= --with-dspam-mode=${DSPAM_MODE}
.endif
.if defined(WITH_CGI)
@ -480,39 +450,46 @@ DOCS= CHANGELOG LICENSE README README.FreeBSD README.courier README.exim \
README.pop3filter README.postfix README.qmail README.sendmail \
RELEASE.NOTES
pre-extract:
BAD_OPT= `${PKG_VERSION} -t ${_OPTIONS_READ} ${PKGNAME}`
pre-everything::
@${ECHO_CMD} ""
@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:"
@${GREP} -B 1 -A ${UPD_LINE_NO} ${PKGNAME} ${FILESDIR}/UPDATING
@${ECHO_CMD} ""
pre-patch:
@${ECHO_CMD} ""
pre-extract:
.if defined(WITH_EXIM_LDA) && defined(WITH_POSTGRESQL73)
@${ECHO_CMD} "******************************************************************"
@${ECHO_CMD} "Warning: If upgrading please proceed as stated in"
@${ECHO_CMD} "${FILESDIR}/UPDATING"
@${ECHO_CMD} "You have both EXIM_LDA and POSTGRESQL73 defined. To have exim"
@${ECHO_CMD} "built with the right pgsql please hit Ctrl-C now and do:"
@${ECHO_CMD} "cd ${PORTSDIR}/mail/exim-postgresql && make POSTGRESQL_PORT=postgresql73 inst
@${ECHO_CMD} "then return here and do:"
@${ECHO_CMD} "make clean && make install"
@${ECHO_CMD} "******************************************************************"
@${ECHO_CMD} ""
.endif
@${ECHO_CMD} "Define vars below before make-ing if you need:"
@${ECHO_CMD} ""
@${ECHO_CMD} "SIGNATURE_LIFE (default 15)"
@${ECHO_CMD} "DSPAM_OWNER (default: root)"
@${ECHO_CMD} "DSPAM_GROUP (default: mail)"
@${ECHO_CMD} "DSPAM_MODE"
@${ECHO_CMD} "DSPAM_HOME (default: ${_VAR_DIR}/dspam)"
@${ECHO_CMD} "DSPAM_HOME_OWNER"
@${ECHO_CMD} "DSPAM_HOME_GROUP"
@${ECHO_CMD} "DSPAM_HOME_MODE (default: 0660)"
@${ECHO_CMD} "LOG_DIR (default: ${_VAR_DIR}/log/dspam)"
@${ECHO_CMD} "QUARANTINE_AGENT (default: mail.local)"
@${ECHO_CMD} "SIGNATURE_LIFE=${SIGNATURE_LIFE} (default 15)"
@${ECHO_CMD} "DSPAM_OWNER=${DSPAM_OWNER} (default: root)"
@${ECHO_CMD} "DSPAM_GROUP=${DSPAM_GROUP} (default: mail)"
@${ECHO_CMD} "DSPAM_MODE=${DSPAM_MODE}"
@${ECHO_CMD} "DSPAM_HOME=${DSPAM_HOME} (default: ${_VAR_DIR}/db/dspam)"
@${ECHO_CMD} "DSPAM_HOME_OWNER=${DSPAM_HOME_OWNER}"
@${ECHO_CMD} "DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP}"
@${ECHO_CMD} "DSPAM_HOME_MODE=${DSPAM_HOME_MODE} (default: 0770)"
@${ECHO_CMD} "LOG_DIR=${LOG_DIR} (default: ${_VAR_DIR}/log/dspam)"
. if defined(WITH_CGI)
@${ECHO_CMD} "Define CGI_PATH before make-ing if you need the CGI files"
@${ECHO_CMD} "installed in other place that this installation's default"
@${ECHO_CMD} "${PREFIX}/www/vhosts/dspam"
. endif
@${ECHO_CMD} "Define WITHOUT_DAEMON if not using OPTIONS and do not whant daemon."
.for old_opt in MAILDROP PROCMAIL TRAD_BAYES ALT_BAYES WITH_SPAM_SUBJ \
USER_LOGGING SYSTEM_LOGGING WEBMAIL OPT_IN SAT PARSE_TO_HEADERS \
BROKEN_MTA BROKEN_ERR_CODES SIGNATURE_HEADERS SIGNATURE_ATACH \
HOMEDIR_DOT SIGNATURE_LIFE
. if defined(WITH_${old_opt}) || defined(WITHOUT_${old_opt}) || ${BAD_OPT}=='<'
#. if defined(CUCU)
HOMEDIR_DOT SIGNATURE_LIFE SQLITE QUARANTINE_AGENT
. if defined(WITH_${old_opt}) || defined(WITHOUT_${old_opt})
@${ECHO_CMD} ""
@${ECHO_CMD} "******************************************************************"
@${ECHO_CMD} "******************************************************************"
@ -535,16 +512,21 @@ pre-patch:
.endfor
post-patch:
${REINPLACE_CMD} -e 's|%%PORTNAME%%|${PORTNAME}|; \
@${REINPLACE_CMD} -e 's|%%PORTNAME%%|${PORTNAME}|; \
s|%%PKGNAME%%|${PKGNAME}|; s|%%MAINTAINER%%|${MAINTAINER}|; \
s|%%LIBTOOLFLAGS%%|${LIBTOOLFLAGS}|g; \
s|-ldb-4.1|-ldb41|g;' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
${WRKSRC}/Makefile.in
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' ${WRKSRC}/src/tools.mysql_drv/purge.sql
@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|' ${WRKSRC}/src/tools.pgsql_drv/purge.sql
@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|' ${WRKSRC}/src/tools.ora_drv/purge.sql
@${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|" ${WRKSRC}/src/tools.sqlite_drv/purge.sql
.if defined(WITH_DAEMON)
@${CP} ${FILESDIR}/dspam.rc ${WRKSRC}
@${REINPLACE_CMD} ${SED_RC_SCRIPT} ${WRKSRC}/dspam.rc
.endif
pre-configure:
@${ECHO_CMD}
@ -558,40 +540,45 @@ pre-configure:
@${ECHO_CMD} "You can use one and only one database back-end at once."
@${FALSE}
.endif
.if defined(WITH_NEURAL_NET) && !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74))
.if defined(WITH_NEURAL_NET) && !(defined(USE_MYSQL) || defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74))
@${ECHO_CMD} "You need MySQL or POSTGRESQL to use neural networking."
@${FALSE}
.endif
.if defined(WITH_VIRT_USERS) && !(defined(WITH_MYSQL) || \
.if defined(WITH_VIRT_USERS) && !(defined(USE_MYSQL) || \
defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) || defined(WITH_ORACLE))
@${ECHO_CMD} "You need MySQL, POSTGRESQL or ORACLE for virtual users."
@${FALSE}
.endif
.if defined(WITH_PREF_EXT) && !( defined(WITH_MYSQL) || \
.if defined(WITH_PREF_EXT) && !( defined(USE_MYSQL) || \
defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) )
@${ECHO_CMD} "You need MySQL or Postgres for preferences extension"
@${FALSE}
.endif
.if defined(WITH_DAEMON) && !( defined(USE_MYSQL) || \
defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) )
@${ECHO_CMD} "You need MySQL or Postgres for Daemon mode, because multithreading support is needed"
@${FALSE}
.endif
.if defined(WITH_USER_HOMEDIR) && defined(WITH_CGI)
@${ECHO_CMD} "USER_HOMEDIR and CGI are incopatible"
@${FALSE}
.endif
post-install:
### to patch dspam.conf
${REINPLACE_CMD} -e 's|/usr/bin/|${PREFIX}/bin/|g' ${WRKSRC}/src/dspam.conf
@${CP} ${WRKSRC}/src/dspam.conf ${WRKSRC}/src/dspam.conf.sample
cd ${WRKSRC}/src/ && \
${INSTALL_DATA} dspam.conf.sample ${PREFIX}/etc
# @${MKDIR} ${LOG_DIR}
# @${MKDIR} ${DSPAM_HOME}
${CP} ${WRKSRC}/src/dspam.conf ${WRKSRC}/src/dspam.conf.sample
cd ${WRKSRC}/src/ && \
${INSTALL} -o ${DSPAM_OWNER} -g ${DSPAM_GROUP} -m 0640 \
dspam.conf.sample ${PREFIX}/etc
.if defined(WITH_DAEMON)
${INSTALL_SCRIPT} ${WRKSRC}/dspam.rc ${RC_DIR}/dspam${RC_SUFX}
.endif
########
# stupid hack until I figure out where/how to patch
@${MKDIR} ${PREFIX}/libdata/pkgconfig
@${MV} ${PREFIX}/lib/pkgconfig/dspam.pc ${PREFIX}/libdata/pkgconfig/dspam.pc
.if defined(WITH_MYSQL40) || defined(WITH_MYSQL41)
.if defined(USE_MYSQL)
@${MKDIR} ${EXAMPLESDIR}/mysql
cd ${WRKSRC}/src/tools.mysql_drv && \
${INSTALL_DATA} README mysql_objects-space.sql \
@ -605,9 +592,8 @@ post-install:
@${MKDIR} ${EXAMPLESDIR}/pgsql
@cd ${WRKSRC}/src/tools.pgsql_drv && \
${INSTALL_DATA} README *.sql ${EXAMPLESDIR}/pgsql
# ${INSTALL_DATA} ${FILESDIR}/pgsql.data ${EXAMPLESDIR}/pgsql
.endif
.if defined(WITH_SQLITE)
.if defined(HAVE_SQLITE)
@${MKDIR} ${EXAMPLESDIR}/sqlite
cd ${WRKSRC}/src/tools.sqlite_drv && \
${INSTALL_DATA} README *.sql ${EXAMPLESDIR}/sqlite
@ -632,8 +618,6 @@ post-install:
${INSTALL_DATA} default.prefs ${CGI_PATH}/default.prefs.sample
cd ${WRKSRC}/cgi && \
${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
# cd ${WRKSRC}/cgi && \
# ${INSTALL_DATA} configure.pl.sample ${CGI_PATH}/configure.pl.sample
@${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/cgi/templates && \
${INSTALL_DATA} *.html ${CGI_PATH}/templates/
.endif

View File

@ -1,2 +1,2 @@
MD5 (dspam-devel.3.3.0.a.20041201.1330.tar.gz) = aa5c742f12e9ada86d94af49f56b5ce3
SIZE (dspam-devel.3.3.0.a.20041201.1330.tar.gz) = 626853
MD5 (dspam-devel-3.3.4.tar.gz) = 254af99f8a1ee24f53e743cdf6d2c43e
SIZE (dspam-devel-3.3.4.tar.gz) = 649379

View File

@ -1,5 +1,5 @@
This file documents some of the problems you may encounter when
upgrading dspam port. I will try our best to minimize these disruptions,
upgrading dspam port. I will try my best to minimize these disruptions,
but sometimes they are unavoidable.
You should get into the habit of checking this file for changes each
@ -10,12 +10,61 @@ also the UPGRADING enclosed in the dspam distribution. You can see it by doing
in the port directory:
make extract; more `find . -type f -maxdepth 2 -name UPGRADING`
###########################################################################
# dspam-devel-3.3.4
#
Users on 4.x are kindly asked to report problems ASAP
I would like to fix them before the freeze on 31. Thanks !
The daemon mode seems to be completead now, so the port act like it should:
- if enabled with WITH_DEAMON we install the rc script; to start it at
boot put 'dspam_enable="YES"' in /etc/rc.conf and set the appropriate
options in dspam.conf
- read section "2.3 Client/Server Mode" from dspam README to learn how to
use dspam in daemon mode
- a simple portupgrade from previous versions will work with no problems
with your current setup, even if compiled with WITH_DEAMON (default)
- change default DB back-end to MySQL to make daemon mode work for package
building
- add MySQL v5.0.x support -- MYSQL50
(based on ports/74761 by Gea-Suan Lin <gslin@netnews.NCTU.edu.tw>)
- USE_MYSQL and have make describe output right
- change of name: SQLITE --> SQLITE2, as we now have sqlite3 support
- add Sqlite v3.x support -- SQLITE3
- add BNR_DEBUG option
- drop QUARANTINE_AGENT as is not supported by ./configure anymore and
set in dspam.conf UntrustedDeliveryAgent and QuarantineAgent to default to
TrustedDeliveryAgent, but leave them commented out
(ports/75548 by Julien Gabel)
- change default DSPAM_HOME_MODE to 0770
(ports/75549 by Julien Gabel <jpeg@thilelli.net>)
- DSPAM_HOME_{OWNER,GROUP} default to DSPAM_{OWNER,GROUP}
- default maximum message size to 300KB in dspam.conf
- correct long-standing copy/paste bug (DSPAM_{GROUP,MODE} were set to
DSPAM_HOME_{GROUP,MODE})
- USE_MYSQL and have make describe output right
- add support for exim [2] which we build with the same database back-end
as dspam if possible ( suggested, incorrectly, in ports/74762 by
Shahbaz Javeed <sjaveed@adderpit.com> )
- fix PREF_EXT and BDB4 cases as well in our Makefile
#############################################################################
# dspam-devel=3.3.0.a.20041203.1245_1 (entry added post-factum, it was an
# automated update approved by me but not under my control)
#
- chase dependecy for sqlite
############################################################################
# dspam-devel-3.3.0.a.20041201.1330
#
Say hello to the daemonized dspam! Enable it at compile-time with DAEMON option.
Say hello to the daemonized dspam! Enble it at compile-time with DAEMON option.
- it speaks LMTP:
LHLO
@ -36,8 +85,6 @@ DATA
- remember that all this is experimental and it may change at any time.
- fix PREX_EXT and BDB4 handling in the port Makefile to really enable them.
############################################################################
# dspam-devel-3.3.0.a.20041125.0945

View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dspam
# REQUIRE: LOGIN NETWORKING SERVERS %%MYSQL%%
# BEFORE: mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
#
# dspam_enable="YES"
#
. /etc/rc.subr
name=dspam
rcvar=`set_rcvar`
command=%%PREFIX%%/bin/${name}
command_args="--daemon > /dev/null 2>&1 &"
pidfile=/var/run/${name}.pid
required_dirs=%%DSPAM_HOME%%
required_files=%%PREFIX%%/etc/${name}.conf
extra_commands=reload
reload()
{
kill -HUP `cat $pidfile`
}
# set defaults
dspam_enable=${dspam_enable:-"NO"}
#dspam_flags=${dspam_flags:-"--daemon &"}
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,55 @@
--- src/dspam.conf.in.orig Thu Dec 30 04:05:39 2004
+++ src/dspam.conf.in Thu Dec 30 04:14:16 2004
@@ -34,7 +34,7 @@
# the user DSPAM is processing mail for. This configuration parameter is only
# necessary if you plan on allowing untrusted processing.
#
-#UntrustedDeliveryAgent "/usr/bin/procmail -d %u"
+#UntrustedDeliveryAgent "@delivery_agent@"
#
# Quarantine Agent: DSPAM's default behavior is to quarantine all mail it
@@ -42,7 +42,7 @@
# a quarantine agent which will be called with all messages DSPAM thinks is
# spam. Use %u to specify the user DSPAM is processing mail for.
#
-#QuarantineAgent "/usr/bin/procmail -d spam"
+#QuarantineAgent "@delivery_agent@"
#
# OnFail: What to do if local delivery or quarantine should fail. If set
@@ -169,7 +169,7 @@
# Storage driver settings: Specific to a particular storage driver. Uncomment
# the configuration specific to your installation, if applicable.
#
-#MySQLServer /var/lib/mysql/mysql.sock
+#MySQLServer /tmp/mysql.sock
#MySQLPort
#MySQLUser dspam
#MySQLPass changeme
@@ -375,6 +375,7 @@
# without processing. Value is in bytes.
#
#MaxMessageSize 4194304
+MaxMessageSize 307200
#
# Daemonized Server: If you are running DSPAM as a daemonized server using
@@ -388,6 +389,7 @@
#ServerQueueSize 32
#ServerPass.Relay1 "secret"
#ServerPass.Relay2 "password"
+# keep this is sync with /usr/local/etc/rc.d/dspam.rc script
#ServerPID /var/run/dspam.pid
# If you wish to use a local domain socket instead of a TCP socket, uncomment
@@ -395,7 +397,8 @@
# you are running the client and server on the same machine, as it eliminates
# much of the bandwidth overhead.
#
-#ServerDomainSocketPath "/tmp/dspam.sock"
+# keep this is sync with /usr/local/etc/rd.d/dspam.rc script
+#ServerDomainSocketPath "/var/run/dspam.sock"
#
# Client Mode: If you are running DSPAM in client/server mode, uncomment and

View File

@ -13,13 +13,6 @@
%%MYSQL%% See %%EXAMPLESDIR%%/mysql/README
%%MYSQL%% for instructions on how to configure DSPAM - MySQL interaction.
%%MYSQL%%
%%MYSQL%% BACKUP FIRST !!!
%%MYSQL%%
%%MYSQL%% To modify a 2.x database use and use it with dspam 3.x use:
%%MYSQL%% %%EXAMPLESDIR%%/mysql/2x_to_3x_db.sql
%%MYSQL%% To modify a 3.1.0 *mysql4.0* use :
%%MYSQL%% %%EXAMPLESDIR%%/mysql/310_to_320.my.sql
%%MYSQL%%
%%PGSQL%%
%%PGSQL%% See %%EXAMPLESDIR%%/pgsql/README
%%PGSQL%% for instructions on how to configure PostrgreSQL
@ -58,27 +51,24 @@
%%CGI%% See %%DOCSDIR%%/README
%%CGI%% especially the CGI and Trusted Users sections for more info.
%%CGI%% If you have problems (after upgrading) check permissions.
%%DAEMON%%
%%DAEMON%% To enable the dspam deamon put dspam_enable="YES" in your
%%DAEMON%% /etc/rc.conf
See %%DOCSDIR%%/RELEASE.NOTES
for new things in this %%PKGNAME%% and
%%DOCSDIR%%/CHANGELOG
for the full list of changes.
Preference extensions are NOT yet integrated in this port,
feel free to test and send patches.
***************************** WARNING: ***************************************
Almost everything regarding how dspam must be configured has changed.
If you are upgrading from 2.x or 3.x be sure to read
%%DOCSDIR%%/UPDATING
******************************************************************************
---- %%PKGNAME%% is considered to be a DEVELOPMENT release. ---
Reporting problems, asking questions:
- small typos, etc. to the maintainer
- FreeBSD specific port-related problems/questions: ports@, maintainer cc'ed
- FreeBSD specific patches, doc enhancements: send-pr maintainer cc'ed
- dspam specific questions: dspam mailling list (maintainer cc'ed if you like)
- dspam specific patches: dspam/dspam-dev mailling list (maintainer cc'ed if you like)
- FreeBSD specific port-related problems/questions/paches: maintainer
(and ports@ if you fell the need); send-pr only if you get no timely reply
- dspam specific questions: dspam/dspam-dev mailling list (maintainer cc'ed
if you like)
- dspam specific patches: dspam/dspam-dev mailling list (maintainer cc'ed if
you like)
Please be sure to include in your email/pr relevant information such as:
uname -a, dspam --version, /var/db/ports/dspam-devel/options, MTA setup.
If needed rebuild WITH_DEBUG and to turn on debugging see DebugOpt in dsapm.conf

View File

@ -1,4 +1,5 @@
bin/dspam
bin/dspamc
bin/dspam_2sql
bin/dspam_admin
bin/dspam_clean
@ -8,11 +9,13 @@ bin/dspam_dump
bin/dspam_genaliases
bin/dspam_merge
bin/dspam_stats
@unexec if cmp -s %D/etc/dspam.conf %D/etc/dspam.conf.sample; then rm -f %D/etc/dspam.conf; fi
etc/dspam.conf.sample
include/dspam/buffer.h
include/dspam/config.h
include/dspam/decode.h
include/dspam/error.h
include/dspam/heap.h
include/dspam/lht.h
include/dspam/libdspam.h
include/dspam/libdspam_objects.h