diff options
author | gdt <gdt@pkgsrc.org> | 2010-10-27 12:26:37 +0000 |
---|---|---|
committer | gdt <gdt@pkgsrc.org> | 2010-10-27 12:26:37 +0000 |
commit | d55c1705e04712808ba2905f589cdbcc926791ce (patch) | |
tree | 176540da29c62cbcc02c6b69d993b2a3cff7f7dc /mail/dcc | |
parent | 49bce93f198e47c5a75b2b3f7b95fdc13208743c (diff) | |
download | pkgsrc-d55c1705e04712808ba2905f589cdbcc926791ce.tar.gz |
Import dcc-1.3.123 as mail/dcc from wip/dcc.
The Distributed Checksum Clearinghouses or DCC is an anti-spam content filter
that runs on a variety of operating systems. As of the middle of 2007, it
involves millions of users, more than six hundred thousand client computer
systems, and more than 250 servers collecting and counting checksums related to
more than 300 million mail messages on week days. The counts can be used by
SMTP servers and mail user agents to detect and reject or filter spam or
unsolicited bulk mail. DCC servers exchange or "flood" common checksums. The
checksums include values that are constant across common variations in bulk
messages, including "personalizations".
Diffstat (limited to 'mail/dcc')
-rw-r--r-- | mail/dcc/DESCR | 9 | ||||
-rw-r--r-- | mail/dcc/INSTALL | 61 | ||||
-rw-r--r-- | mail/dcc/MESSAGE | 56 | ||||
-rw-r--r-- | mail/dcc/Makefile | 157 | ||||
-rw-r--r-- | mail/dcc/PLIST | 65 | ||||
-rw-r--r-- | mail/dcc/distinfo | 5 | ||||
-rw-r--r-- | mail/dcc/files/dcc-spamassassin.pre | 28 | ||||
-rw-r--r-- | mail/dcc/files/dccd.sh | 42 | ||||
-rw-r--r-- | mail/dcc/files/dccifd.sh | 42 | ||||
-rw-r--r-- | mail/dcc/files/dccm.sh | 42 | ||||
-rw-r--r-- | mail/dcc/options.mk | 24 |
11 files changed, 531 insertions, 0 deletions
diff --git a/mail/dcc/DESCR b/mail/dcc/DESCR new file mode 100644 index 00000000000..f8d3a7020d6 --- /dev/null +++ b/mail/dcc/DESCR @@ -0,0 +1,9 @@ +The Distributed Checksum Clearinghouses or DCC is an anti-spam content filter +that runs on a variety of operating systems. As of the middle of 2007, it +involves millions of users, more than six hundred thousand client computer +systems, and more than 250 servers collecting and counting checksums related to +more than 300 million mail messages on week days. The counts can be used by +SMTP servers and mail user agents to detect and reject or filter spam or +unsolicited bulk mail. DCC servers exchange or "flood" common checksums. The +checksums include values that are constant across common variations in bulk +messages, including "personalizations". diff --git a/mail/dcc/INSTALL b/mail/dcc/INSTALL new file mode 100644 index 00000000000..ed3b94ad8fe --- /dev/null +++ b/mail/dcc/INSTALL @@ -0,0 +1,61 @@ +# $NetBSD: INSTALL,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ +# +# mostly taken from homedir/Makefile.in +# +# +case ${STAGE} in +POST-INSTALL) + DD=/bin/dd + TR=/usr/bin/tr + CKSUM=/usr/bin/cksum + CDCC=${PREFIX}/bin/cdcc + + URND=/dev/urandom + + DCC_USER=@DCC_USER@ + DCC_GROUP=@DCC_GROUP@ + DCC_HOME=@DCC_HOME@ + DCC_EGDIR=@DCC_EGDIR@ + + DCC_MODE_PRIV=0600 + + IDS=ids + MAP=map + MAPTXT=${MAP}.txt + + SECRET1=$(${DD} if=${URND} count=1 2>&1 | ${CKSUM} | ${TR} ' ' xy) + SECRET2=$(${DD} if=${URND} count=1 2>&1 | ${CKSUM} | ${TR} ' ' xy) + # + # assemble sed-commands + # + SED_CMD1="-e /^[:blank:]*[^#]/{s/secret1/${SECRET1}/;}" + SED_CMD2="-e /^[:blank:]*[^#]/{s/secret2/${SECRET2}/;}" + + if [ ! -f ${DCC_HOME}/${IDS} ]; then + # + # replace secrets in ids + # + ${SED} ${SED_CMD1} ${SED_CMD2} ${DCC_EGDIR}/${IDS} \ + >${DCC_HOME}/${IDS} + ${CHMOD} ${DCC_MODE_PRIV} ${DCC_HOME}/${IDS} + ${CHOWN} ${DCC_USER}:${DCC_GROUP} ${DCC_HOME}/${IDS} + fi + + if [ ! -f ${DCC_HOME}/${MAP} -a ! -f ${DCC_HOME}/${MAPTXT} ]; then + # + # replace random secrets in MAPTXT and generate MAP + # + ${SED} ${SED_CMD1} ${DCC_EGDIR}/${MAPTXT} | + ${CDCC} -qh${DCC_HOME} "new map; load -" + ${CHMOD} ${DCC_MODE_PRIV} ${DCC_HOME}/${MAP} + ${CHOWN} ${DCC_USER}:${DCC_GROUP} ${DCC_HOME}/${MAP} + # + # generate MAPTXT from MAP + # + ${CDCC} -qh${DCC_HOME} "file ${MAP}; info" \ + >${DCC_HOME}/${MAPTXT} + ${CHMOD} ${DCC_MODE_PRIV} ${DCC_HOME}/${MAPTXT} + ${CHOWN} ${DCC_USER}:${DCC_GROUP} ${DCC_HOME}/${MAPTXT} + fi + ;; +esac diff --git a/mail/dcc/MESSAGE b/mail/dcc/MESSAGE new file mode 100644 index 00000000000..64d9e38ebf6 --- /dev/null +++ b/mail/dcc/MESSAGE @@ -0,0 +1,56 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ + +Use of Public DCC Servers +------------------------- + +This package will by default query public servers; before running it +read the documentation and terms of use at: + + http://www.rhyolite.com/dcc/#public-servers + +The essence is: + + Public DCC servers for anonymous DCC clients handling fewer than + 100,000 mail messages per day are provided by people and organizations + in the following list. The default contents of /var/dcc/map file point + to these servers. + + Note well that it has been wrong to take and resell the bandwidth and, + most important, human system administration work of the public DCC + servers to third parties. Blunt words for that include theft and + stealing. Vendors of "spam appliances" or services including DCC such + as "managed email" must provide DCC servers of their own or contract + for DCC services from others. They must also buy a license for the + commercial version of the DCC software. + +(Note that these terms are similar but not identical to the license +for the dcc software itself.) + +=========================================================================== +=========================================================================== + +DCC Server (dccd) +----------------- + +Running an own DCC server is strongly recommended if your site handles +more than 100k messages per day. It will decrease the load on public DCC +servers and increase the responsiveness of your DCC clients. When doing +so, cron-dccd should run at least once per day in order to remove old +checksums from the database: + + ${PREFIX}/libexec/cron-dccd + +=========================================================================== +=========================================================================== + +SpamAssassin DCC Module +----------------------- + +For a proper initialization of the SpamAssassin DCC module (DCC.pm), +copy dcc-spamassassin.pre into the main SpamAssassin configuration +directory and restart spamd: + + ${PREFIX}/share/examples/dcc/dcc-spamassassin.pre + +=========================================================================== diff --git a/mail/dcc/Makefile b/mail/dcc/Makefile new file mode 100644 index 00000000000..4e542508176 --- /dev/null +++ b/mail/dcc/Makefile @@ -0,0 +1,157 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ +# +# Request by the author: +# +# On Thu, Jan 29, 2009 at 06:27:03PM +0000, +# Vernon Schryver wrote: +# > +# > There should be no patches in whatever +# > you distribute. Updatedcc must work. +# +DISTNAME= dcc-1.3.123 +CATEGORIES= mail +MASTER_SITES= http://www.rhyolite.com/dcc/source/old/ +EXTRACT_SUFX= .tar.Z + +OWNER= petar@smokva.net +HOMEPAGE= http://www.rhyolite.com/dcc/ +COMMENT= Anti-spam content filter +LICENSE= dcc-free-license + +PKG_DESTDIR_SUPPORT= user-destdir + +.include "../../mk/bsd.prefs.mk" + +DCC_USER?= dcc +DCC_GROUP?= dcc +DCC_HOME?= ${VARBASE}/dcc +DCC_RUN?= ${VARBASE}/run/dcc + +# expanded in INSTALL +FILES_SUBST+= DCC_USER=${DCC_USER} \ + DCC_GROUP=${DCC_GROUP} \ + DCC_HOME=${DCC_HOME} \ + DCC_EGDIR=${DCC_EGDIR} + +# expanded in files/dcc{d,ifd,m} +FILES_SUBST+= DCC_RUN=${DCC_RUN} + +SUBST_CLASSES+= dae +SUBST_STAGE.dae= post-patch +SUBST_FILES.dae= homedir/dcc_conf.in +SUBST_SED.dae= -e 's/^\(DCCD_ENABLE=\)off$$/\1on/' \ + -e 's/^\(DCCM_ENABLE=\)off$$/\1on/' \ + -e 's/^\(DCCIFD_ENABLE=\)off$$/\1on/' +SUBST_MESSAGE.dae= Enabling all daemons in dcc_conf + +HAS_CONFIGURE= yes +MAKE_JOBS_SAFE= no + +CONFIGURE_ENV+= PERL=${PERL5:Q} \ + DCC_XARGS=${XARGS:Q} + +CONFIGURE_ARGS+= --homedir=${DCC_HOME} \ + --bindir=${PREFIX}/bin \ + --libexecdir=${PREFIX}/libexec \ + --mandir=${PREFIX}/${PKGMANDIR} \ + --with-make-cmd=${MAKE_PROGRAM:Q} \ + --with-rundir=${DCC_RUN} \ + --with-uid=${DCC_USER} + +.include "options.mk" + +BUILD_DEFS+= VARBASE + +INSTALLATION_DIRS+= bin libexec ${PKGMANDIR}/man8 \ + share/examples/dcc/cgi-bin + +PKG_GROUPS= ${DCC_GROUP} +PKG_USERS= ${DCC_USER}:${DCC_GROUP} + +OWN_DIRS_PERMS+= ${DCC_HOME} ${DCC_USER} ${DCC_GROUP} 0755 \ + ${DCC_HOME}/log ${DCC_USER} ${DCC_GROUP} 0710 + +DCC_EGDIR= ${PREFIX}/share/examples/dcc +DCC_PERMS_CONFIG= ${ROOT_USER} ${ROOT_GROUP} 0644 +CONF_FILES_PERMS+= ${DCC_EGDIR}/dcc_conf ${DCC_HOME}/dcc_conf ${DCC_PERMS_CONFIG} \ + ${DCC_EGDIR}/flod ${DCC_HOME}/flod ${DCC_PERMS_CONFIG} \ + ${DCC_EGDIR}/grey_flod ${DCC_HOME}/grey_flod ${DCC_PERMS_CONFIG} \ + ${DCC_EGDIR}/grey_whitelist ${DCC_HOME}/grey_whitelist ${DCC_PERMS_CONFIG} \ + ${DCC_EGDIR}/whiteclnt ${DCC_HOME}/whiteclnt ${DCC_PERMS_CONFIG} \ + ${DCC_EGDIR}/whitecommon ${DCC_HOME}/whitecommon ${DCC_PERMS_CONFIG} \ + ${DCC_EGDIR}/whitelist ${DCC_HOME}/whitelist ${DCC_PERMS_CONFIG} +RCD_SCRIPTS+= dccd dccifd + +DCC_PERMS_SETUID= ${DCC_USER} ${ROOT_GROUP} 4555 +SPECIAL_PERMS+= bin/cdcc ${DCC_PERMS_SETUID} \ + bin/dccproc ${DCC_PERMS_SETUID} \ + libexec/dccsight ${DCC_PERMS_SETUID} + +post-build: + ${SED} -e "s!@DCC_HOME@!${DCC_HOME}!g" ${FILESDIR}/dcc-spamassassin.pre \ + >${WRKDIR}/dcc-spamassassin.pre + +# options.mk/dccm adds a dependency on do-install. +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/cdcc/cdcc ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/ck2ip/ck2ip ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/dbclean/dbclean ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/dblist/dblist ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/dccd/dccd ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/dccifd/dccifd ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/dccproc/dccproc ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/dccsight/dccsight ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/dns-helper/dns-helper ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_PROGRAM} ${WRKSRC}/misc/wlist ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/chgpasswd ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/common ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/edit-whiteclnt ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/http2https ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/list-log ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/list-msg ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/cgi-bin/webuser-notify ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/cron-dccd ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/dcc-nagios ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/dcc-stats-collect ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/dcc-stats-graph ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/dcc-stats-init ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/fetch-testmsg-whitelist ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/fetchblack ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/fetchids ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/hackmc ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/list-clients ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/logger ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/newwebuser ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/rcDCC ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/start-dccd ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/start-dccifd ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/start-dccm ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/start-grey ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/stats-get ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/stop-dccd ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/uninstalldcc ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_SCRIPT} ${WRKSRC}/misc/updatedcc ${DESTDIR}${PREFIX}/libexec/ + ${INSTALL_MAN} ${WRKSRC}/cdcc.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dbclean.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dblist.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dcc.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dccd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dccifd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dccm.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dccproc.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_MAN} ${WRKSRC}/dccsight.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_DATA} ${WRKSRC}/cgi-bin/README ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_DATA} ${WRKSRC}/cgi-bin/footer ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_DATA} ${WRKSRC}/cgi-bin/header ${DESTDIR}${DCC_EGDIR}/cgi-bin/ + ${INSTALL_DATA} ${WRKSRC}/homedir/dcc_conf ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/flod ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/grey_flod ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/grey_whitelist ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/ids ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/map.txt ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/whiteclnt ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/whitecommon ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKSRC}/homedir/whitelist ${DESTDIR}${DCC_EGDIR}/ + ${INSTALL_DATA} ${WRKDIR}/dcc-spamassassin.pre ${DESTDIR}${DCC_EGDIR}/ + +.include "../../mk/bsd.pkg.mk" diff --git a/mail/dcc/PLIST b/mail/dcc/PLIST new file mode 100644 index 00000000000..8f270c45bd1 --- /dev/null +++ b/mail/dcc/PLIST @@ -0,0 +1,65 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ +bin/cdcc +bin/dccproc +libexec/ck2ip +libexec/cron-dccd +libexec/dbclean +libexec/dblist +libexec/dcc-nagios +libexec/dcc-stats-collect +libexec/dcc-stats-graph +libexec/dcc-stats-init +libexec/dccd +libexec/dccifd +${PLIST.dccm}libexec/dccm +libexec/dccsight +libexec/dns-helper +libexec/fetch-testmsg-whitelist +libexec/fetchblack +libexec/fetchids +libexec/hackmc +libexec/list-clients +libexec/logger +libexec/newwebuser +libexec/rcDCC +libexec/start-dccd +libexec/start-dccifd +libexec/start-dccm +libexec/start-grey +libexec/stats-get +libexec/stop-dccd +libexec/uninstalldcc +libexec/updatedcc +libexec/wlist +man/man8/cdcc.8 +man/man8/dbclean.8 +man/man8/dblist.8 +man/man8/dcc.8 +man/man8/dccd.8 +man/man8/dccifd.8 +man/man8/dccm.8 +man/man8/dccproc.8 +man/man8/dccsight.8 +share/examples/dcc/cgi-bin/README +share/examples/dcc/cgi-bin/chgpasswd +share/examples/dcc/cgi-bin/common +share/examples/dcc/cgi-bin/edit-whiteclnt +share/examples/dcc/cgi-bin/footer +share/examples/dcc/cgi-bin/header +share/examples/dcc/cgi-bin/http2https +share/examples/dcc/cgi-bin/list-log +share/examples/dcc/cgi-bin/list-msg +share/examples/dcc/cgi-bin/webuser-notify +share/examples/dcc/dcc-spamassassin.pre +share/examples/dcc/dcc_conf +share/examples/dcc/flod +share/examples/dcc/grey_flod +share/examples/dcc/grey_whitelist +share/examples/dcc/ids +share/examples/dcc/map.txt +share/examples/dcc/whiteclnt +share/examples/dcc/whitecommon +share/examples/dcc/whitelist +share/examples/rc.d/dccd +share/examples/rc.d/dccifd +${PLIST.dccm}share/examples/rc.d/dccm diff --git a/mail/dcc/distinfo b/mail/dcc/distinfo new file mode 100644 index 00000000000..9661c12e271 --- /dev/null +++ b/mail/dcc/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ + +SHA1 (dcc-1.3.123.tar.Z) = 3127cdde1ce374fbc5ef08fa5103cffcf93b99ee +RMD160 (dcc-1.3.123.tar.Z) = c7b0cedba3feffc4ad7c94249a56303c7f09bf2b +Size (dcc-1.3.123.tar.Z) = 1663943 bytes diff --git a/mail/dcc/files/dcc-spamassassin.pre b/mail/dcc/files/dcc-spamassassin.pre new file mode 100644 index 00000000000..f0e05d2c6d0 --- /dev/null +++ b/mail/dcc/files/dcc-spamassassin.pre @@ -0,0 +1,28 @@ +# +# spamassassin configuration example +# +# +# Copy this file into the main SpamAssassin configuration directory +# and restart spamd in order to initialize DCC.pm properly. Use +# dcc_dccifd_path instead of dcc_home if your dccifd-socket is not +# in @DCC_HOME@ or has a different name (`dccifd' is default). +# +# Also make sure that dccifd is running or SpamAssassin won't be +# able to find the socket and will fall back to dccproc. There is +# nothing wrong with that -- dccifd is just considered to be more +# efficient than dccproc. + + +# load DCC.pm +# +loadplugin Mail::SpamAssassin::Plugin::DCC + + +# DCC home directory +# +dcc_home @DCC_HOME@ + + +# path to dccifd socket +# +#dcc_dccifd_path @DCC_HOME@/dccifd diff --git a/mail/dcc/files/dccd.sh b/mail/dcc/files/dccd.sh new file mode 100644 index 00000000000..28e8f6d94ac --- /dev/null +++ b/mail/dcc/files/dccd.sh @@ -0,0 +1,42 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dccd.sh,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ +# +# +# PROVIDE: dccd +# REQUIRE: DAEMON +# BEFORE: mail spamd + +$_rc_subr_loaded . /etc/rc.subr + +name="dccd" +rcvar="${name}" +start_precmd="dcc_precmd" +command="@PREFIX@/libexec/start-${name}" +procname="@PREFIX@/libexec/${name}" +pidfile="@DCC_RUN@/${name}.pid" +# +# +# start-dcc{d,ifd,m} understands certain flags while +# it passes everything behind -a to dcc{d,ifd,m} +# +# +dcc_precmd() +{ + if [ -n "${rc_flags}" ]; then + rc_flags="-a '${rc_flags}'" + fi + + eval dcc_start_flags=\$${name}_start_flags + if [ -n "${dcc_start_flags}" ]; then + rc_flags="${dcc_start_flags} ${rc_flags}" + fi + + if [ -n "${command_args}" ]; then + rc_flags="${command_args} ${rc_flags}" + unset command_args + fi +} + +load_rc_config "${name}" +run_rc_command "${1}" diff --git a/mail/dcc/files/dccifd.sh b/mail/dcc/files/dccifd.sh new file mode 100644 index 00000000000..be9c53b569c --- /dev/null +++ b/mail/dcc/files/dccifd.sh @@ -0,0 +1,42 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dccifd.sh,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ +# +# +# PROVIDE: dccifd +# REQUIRE: DAEMON +# BEFORE: mail spamd + +$_rc_subr_loaded . /etc/rc.subr + +name="dccifd" +rcvar="${name}" +start_precmd="dcc_precmd" +command="@PREFIX@/libexec/start-${name}" +procname="@PREFIX@/libexec/${name}" +pidfile="@DCC_RUN@/${name}.pid" +# +# +# start-dcc{d,ifd,m} understands certain flags while +# it passes everything behind -a to dcc{d,ifd,m} +# +# +dcc_precmd() +{ + if [ -n "${rc_flags}" ]; then + rc_flags="-a '${rc_flags}'" + fi + + eval dcc_start_flags=\$${name}_start_flags + if [ -n "${dcc_start_flags}" ]; then + rc_flags="${dcc_start_flags} ${rc_flags}" + fi + + if [ -n "${command_args}" ]; then + rc_flags="${command_args} ${rc_flags}" + unset command_args + fi +} + +load_rc_config "${name}" +run_rc_command "${1}" diff --git a/mail/dcc/files/dccm.sh b/mail/dcc/files/dccm.sh new file mode 100644 index 00000000000..4f117188336 --- /dev/null +++ b/mail/dcc/files/dccm.sh @@ -0,0 +1,42 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dccm.sh,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ +# +# +# PROVIDE: dccm +# REQUIRE: DAEMON +# BEFORE: mail spamd + +$_rc_subr_loaded . /etc/rc.subr + +name="dccm" +rcvar="${name}" +start_precmd="dcc_precmd" +command="@PREFIX@/libexec/start-${name}" +procname="@PREFIX@/libexec/${name}" +pidfile="@DCC_RUN@/${name}.pid" +# +# +# start-dcc{d,ifd,m} understands certain flags while +# it passes everything behind -a to dcc{d,ifd,m} +# +# +dcc_precmd() +{ + if [ -n "${rc_flags}" ]; then + rc_flags="-a '${rc_flags}'" + fi + + eval dcc_start_flags=\$${name}_start_flags + if [ -n "${dcc_start_flags}" ]; then + rc_flags="${dcc_start_flags} ${rc_flags}" + fi + + if [ -n "${command_args}" ]; then + rc_flags="${command_args} ${rc_flags}" + unset command_args + fi +} + +load_rc_config "${name}" +run_rc_command "${1}" diff --git a/mail/dcc/options.mk b/mail/dcc/options.mk new file mode 100644 index 00000000000..82921c6e820 --- /dev/null +++ b/mail/dcc/options.mk @@ -0,0 +1,24 @@ +# $NetBSD: options.mk,v 1.1.1.1 2010/10/27 12:26:37 gdt Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.dcc +PKG_SUPPORTED_OPTIONS= dccm +PKG_SUGGESTED_OPTIONS= + +.include "../../mk/bsd.options.mk" + +PLIST_VARS+= dccm +# +# +# Enable dccm, the DCC milter interface. +# +# +.if empty(PKG_OPTIONS:Mdccm) +CONFIGURE_ARGS+= --disable-dccm +.else +RCD_SCRIPTS+= dccm +PLIST.dccm= yes +do-install: dccm-install +dccm-install: + ${INSTALL_PROGRAM} ${WRKSRC}/dccm/dccm ${DESTDIR}${PREFIX}/libexec/ +.include "../../mail/libmilter/buildlink3.mk" +.endif |