diff options
author | Lim Swee Tat <st_lim@gentoo.org> | 2004-07-21 07:01:47 +0000 |
---|---|---|
committer | Lim Swee Tat <st_lim@gentoo.org> | 2004-07-21 07:01:47 +0000 |
commit | 994759d33b7da2393c180b99e744bc77c4dc96b0 (patch) | |
tree | f1806f95e8a2b70c24025d969395d42f1deb5ffc /mail-filter | |
parent | Unsupported. Removed. (diff) | |
download | gentoo-2-994759d33b7da2393c180b99e744bc77c4dc96b0.tar.gz gentoo-2-994759d33b7da2393c180b99e744bc77c4dc96b0.tar.bz2 gentoo-2-994759d33b7da2393c180b99e744bc77c4dc96b0.zip |
Added dspam-3.1.0_beta.1.1, and fixed permission problems with dspam so that we can ultimately get dspam-web working.
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/dspam/ChangeLog | 6 | ||||
-rw-r--r-- | mail-filter/dspam/Manifest | 9 | ||||
-rw-r--r-- | mail-filter/dspam/dspam-3.0.0.ebuild | 76 | ||||
-rw-r--r-- | mail-filter/dspam/dspam-3.1.0_beta11.ebuild | 228 | ||||
-rw-r--r-- | mail-filter/dspam/files/digest-dspam-3.1.0_beta11 | 1 | ||||
-rw-r--r-- | mail-filter/dspam/files/trusted.users | 3 |
6 files changed, 294 insertions, 29 deletions
diff --git a/mail-filter/dspam/ChangeLog b/mail-filter/dspam/ChangeLog index 5b5ccbed2b1d..10122a8a5035 100644 --- a/mail-filter/dspam/ChangeLog +++ b/mail-filter/dspam/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for mail-filter/dspam # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.4 2004/06/30 02:18:20 st_lim Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.5 2004/07/21 07:01:47 st_lim Exp $ + + 21 Jul 2004; Lim Swee Tat <st_lim@gentoo.org> dspam-3.0.0.ebuild: + Added information to use the user dspam + Added exim,maildrop and cyrus specific delivery agent options 30 Jun 2004; Lim Swee Tat <st_lim@gentoo.org> files/crontab.db4, files/crontab.mysql: diff --git a/mail-filter/dspam/Manifest b/mail-filter/dspam/Manifest index 5d1eff643db4..05b85ca42c88 100644 --- a/mail-filter/dspam/Manifest +++ b/mail-filter/dspam/Manifest @@ -1,16 +1,17 @@ -MD5 6b93d3462cc52de0678e6bece12bfab2 dspam-3.0.0.ebuild 5749 -MD5 3f32049000ba9d5400e1efb8a6484ab8 ChangeLog 1120 +MD5 a5739d6d00e800123a343a9d51455b69 dspam-3.0.0.ebuild 6983 +MD5 42715032715e0c32a298b297ae941805 dspam-3.1.0_beta11.ebuild 7023 +MD5 7e25a78748353d7b837c344648e115f3 ChangeLog 1231 MD5 02610fe17122bb3a27ca3dcbf7374fcc metadata.xml 311 -MD5 2cd345708a9889a04c472a9e5be7400e files/untrusted.mailer_args 24 MD5 2a79c945ef6c7e7bd45aa1d46ae99e69 files/mysql_install_db 114 MD5 f2f86e8f7ab440c8537f40fa18a0ee43 files/crontab.mysql 118 MD5 05dce5dc8cf516655657aa2a4cc5f1da files/digest-dspam-3.0.0 63 MD5 8b68501138fbe92e10bbd93a03c9f2ab files/upgrade.sql 807 MD5 cd1bdb75fd86304f9453741a910cb8a2 files/crontab.db4 196 MD5 84ec40b77696359ae49560588db9b948 files/mysql.data 52 -MD5 d10a51bd9e83658cb5ea1e501570261b files/trusted.users 26 +MD5 e6d1b8232199f288fe75501251ade317 files/trusted.users 19 MD5 cefc786a1b60f3041eb3972aafb0b543 files/logrotate.dspam 154 MD5 e0469b961385fda4305602dc2519d319 files/README.qmail 2317 MD5 9fed58b73e35e02ecc3f9a08dcd94eaa files/mysql_purge_db 73 +MD5 8fce97b718a95e27f75b811cde060f3c files/digest-dspam-3.1.0_beta11 72 MD5 5bcf982f468f4843ef3aa51213cc0023 files/mysql_create_user.sql 194 MD5 c12a54112c6fec3530a7b1a368d04ac8 files/README.postfix 309 diff --git a/mail-filter/dspam/dspam-3.0.0.ebuild b/mail-filter/dspam/dspam-3.0.0.ebuild index a2b3529e7cb5..ac3ee6aebb86 100644 --- a/mail-filter/dspam/dspam-3.0.0.ebuild +++ b/mail-filter/dspam/dspam-3.0.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.0.0.ebuild,v 1.3 2004/06/28 03:23:41 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.0.0.ebuild,v 1.4 2004/07/21 07:01:47 st_lim Exp $ inherit eutils @@ -9,9 +9,13 @@ SRC_URI="http://www.nuclearelephant.com/projects/dspam/sources/${P}.tar.gz" HOMEPAGE="http://www.nuclearelephant.com/projects/dspam/index.html" LICENSE="GPL-2" -IUSE="debug mysql procmail neural" +IUSE="debug mysql neural procmail cyrus exim maildrop" DEPEND="mysql? ( >=dev-db/mysql-3.23 ) || ( >=sys-libs/db-4.0 ) - procmail? ( >=mail-filter/procmail-3.22 )" + procmail? ( >=mail-filter/procmail-3.22 ) + x86? ( cyrus? ( >=net-mail/cyrus-imapd-2.1.15 )) + maildrop? ( >=mail-filter/maildrop-1.5.3 ) + exim? ( >=mail-mta/exim-4.34 ) + " RDEPEND="virtual/cron app-admin/logrotate" KEYWORDS="~x86 ~ppc" @@ -25,23 +29,39 @@ CONFIGDIR="${HOMEDIR}/config" MYSQL_TABLE_TYPE="space.optimized" +pkg_setup() { + id dspam 2>/dev/null || enewgroup dspam 65532 + id dspam 2>/dev/null || enewuser dspam 65532 /bin/bash ${HOMEDIR} dspam +} + src_compile() { local myconf # these are the default settings myconf="${myconf} --with-signature-life=14" - use procmail && myconf="${myconf} --with-delivery-agent=/usr/bin/procmail" - + if use cyrus; then + myconf="${myconf} --with-delivery-agent='/usr/lib/cyrus/deliver \$u'" + elif use exim; then + myconf="${myconf} --with-delivery-agent='/usr/sbin/exim -oMr spam-scanned'" + elif use maildrop; then + myconf="${myconf} --with-delivery-agent='/usr/bin/maildrop -d \$u'" + elif use procmail; then + myconf="${myconf} --with-delivery-agent=/usr/bin/procmail" + fi + myconf="${myconf} --enable-homedir-dotfiles" + myconf="${myconf} --enable-spam-subject" + myconf="${myconf} --enable-chi-square" + myconf="${myconf} --enable-robinson" myconf="${myconf} --enable-robinson-pvalues" myconf="${myconf} --enable-source-address-tracking" # ${HOMEDIR}/data is a symlink to ${DATADIR} myconf="${myconf} --with-dspam-home=${HOMEDIR}" myconf="${myconf} --with-dspam-mode=4755" - myconf="${myconf} --with-dspam-owner=root" - myconf="${myconf} --with-dspam-group=mail" - myconf="${myconf} --with-dspam-home-owner=root" - myconf="${myconf} --with-dspam-home-group=mail" + myconf="${myconf} --with-dspam-owner=dspam" + myconf="${myconf} --with-dspam-group=dspam" + myconf="${myconf} --with-dspam-home-owner=dspam" + myconf="${myconf} --with-dspam-home-group=dspam" # enables support for debugging (touch /etc/dspam/.debug to turn on) # optional: even MORE debugging output, use with extreme caution! @@ -52,6 +72,7 @@ src_compile() { myconf="${myconf} --with-storage-driver=mysql_drv" myconf="${myconf} --with-mysql-includes=/usr/include/mysql" myconf="${myconf} --with-mysql-libraries=/usr/lib/mysql" + myconf="${myconf} --with-client-compression" # an experimental feature available with MySQL backend if use neural ; then @@ -70,18 +91,17 @@ src_compile() { src_install () { # open up perms on /etc/mail/dspam - diropts -m0775 -o root -g mail + diropts -m0775 -o dspam -g dspam dodir ${HOMEDIR} keepdir ${HOMEDIR} # keeps dspam data in /var - diropts -m0770 -o root -g mail + diropts -m0770 -o dspam -g dspam dodir ${DATADIR} keepdir ${DATADIR} # keeps dspam log in /var/log - diropts -m0770 - diropts -m0775 -o root -g mail + diropts -m0775 -o dspam -g dspam dodir ${LOGDIR} keepdir ${LOGDIR} @@ -97,9 +117,17 @@ src_install () { # install some initial configuration insinto ${HOMEDIR} - insopts -m0640 -o root -g mail + insopts -m0640 -o dspam -g dspam doins ${FILESDIR}/trusted.users - doins ${FILESDIR}/untrusted.mailer_args + if use cyrus; then + echo "/usr/lib/cyrus/deliver $u" > ${T}/untrusted.mailer_args + elif use exim; then + echo "/usr/sbin/exim -oMr spam-scanned" > ${T}/untrusted.mailer_args + elif use courier; then + echo "/usr/bin/maildrop -d $u" > ${T}/untrusted.mailer_args + elif use procmail; then + echo "/usr/bin/procmail -d $u" > ${T}/untrusted.mailer_args + fi # database related configuration and scripts if use mysql ; then @@ -127,14 +155,14 @@ src_install () { ${FILESDIR}/mysql_purge_db > ${T}/mysql_purge_db insinto ${CONFIGDIR} - insopts -m644 -o root -g mail + insopts -m644 -o dspam -g dspam doins ${T}/mysql.data doins ${T}/mysql_setup.sql doins ${FILESDIR}/upgrade.sql newins tools.mysql_drv/purge.sql mysql_purge.sql exeinto ${CONFIGDIR} - exeopts -m755 -o root -g mail + exeopts -m755 -o dspam -g dspam doexe ${T}/mysql_install_db doexe ${T}/mysql_purge_db @@ -145,26 +173,26 @@ src_install () { fi # installs the cron job to the cron directory - diropts -m0755 -o root -g mail + diropts -m0755 -o dspam -g dspam dodir /etc/cron.daily keepdir /etc/cron.daily exeinto /etc/cron.daily - exeopts -m0755 -o root -g mail + exeopts -m0755 -o dspam -g dspam doexe ${T}/dspam.cron # installs the logrotation scripts to the logrotate.d directory - diropts -m0755 -o root -g mail + diropts -m0755 -o dspam -g dspam dodir /etc/logrotate.d keepdir /etc/logrotate.d insinto /etc/logrotate.d - insopts -m0755 -o root -g mail + insopts -m0755 -o dspam -g dspam newins ${FILESDIR}/logrotate.dspam dspam # Symlinks data to HOMEDIR dosym ${DATADIR} ${HOMEDIR}/data # Log files for symlinks - diropts -m0755 -o root -g mail + diropts -m0755 -o dspam -g dspam dodir ${LOGDIR} keepdir ${LOGDIR} touch ${D}${LOGDIR}/sql.errors @@ -184,6 +212,10 @@ pkg_postinst() { einfo "To setup dspam to run out-of-the-box on your system with a mysql database, run:" einfo "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" fi + if use exim ; then + echo + einfo "To use dspam in conjunction with your exim system, you should read the README" + fi } pkg_config () { diff --git a/mail-filter/dspam/dspam-3.1.0_beta11.ebuild b/mail-filter/dspam/dspam-3.1.0_beta11.ebuild new file mode 100644 index 000000000000..fa24134e0124 --- /dev/null +++ b/mail-filter/dspam/dspam-3.1.0_beta11.ebuild @@ -0,0 +1,228 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.1.0_beta11.ebuild,v 1.1 2004/07/21 07:01:47 st_lim Exp $ + +inherit eutils + +MY_PV=${PV/_beta11/.beta.1.1} +S=${WORKDIR}/${PN}-${MY_PV} +DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter" +SRC_URI="http://www.nuclearelephant.com/projects/dspam/sources/${PN}-${MY_PV}.tar.gz" +HOMEPAGE="http://www.nuclearelephant.com/projects/dspam/index.html" +LICENSE="GPL-2" + +IUSE="debug mysql neural procmail cyrus exim maildrop" +DEPEND="mysql? ( >=dev-db/mysql-3.23 ) || ( >=sys-libs/db-4.0 ) + procmail? ( >=mail-filter/procmail-3.22 ) + x86? ( cyrus? ( >=net-mail/cyrus-imapd-2.1.15 )) + maildrop? ( >=mail-filter/maildrop-1.5.3 ) + exim? ( >=mail-mta/exim-4.34 ) + " +RDEPEND="virtual/cron + app-admin/logrotate" +KEYWORDS="~x86 ~ppc" +SLOT="3.0" + +# some FHS-like structure +HOMEDIR="/etc/mail/dspam" +DATADIR="/var/spool/dspam" +LOGDIR="/var/log/dspam" +CONFIGDIR="${HOMEDIR}/config" + +MYSQL_TABLE_TYPE="space.optimized" + +pkg_setup() { + id dspam 2>/dev/null || enewgroup dspam 65532 + id dspam 2>/dev/null || enewuser dspam 65532 /bin/bash ${HOMEDIR} dspam +} + +src_compile() { + local myconf + + # these are the default settings + myconf="${myconf} --with-signature-life=14" + if use cyrus; then + myconf="${myconf} --with-delivery-agent='/usr/lib/cyrus/deliver \$u'" + elif use exim; then + myconf="${myconf} --with-delivery-agent='/usr/sbin/exim -oMr spam-scanned'" + elif use maildrop; then + myconf="${myconf} --with-delivery-agent='/usr/bin/maildrop -d \$u'" + elif use procmail; then + myconf="${myconf} --with-delivery-agent=/usr/bin/procmail" + fi + myconf="${myconf} --enable-homedir-dotfiles" + myconf="${myconf} --enable-spam-subject" + myconf="${myconf} --enable-chi-square" + myconf="${myconf} --enable-robinson" + myconf="${myconf} --enable-robinson-pvalues" + myconf="${myconf} --enable-source-address-tracking" + + # ${HOMEDIR}/data is a symlink to ${DATADIR} + myconf="${myconf} --with-dspam-home=${HOMEDIR}" + myconf="${myconf} --with-dspam-mode=4755" + myconf="${myconf} --with-dspam-owner=dspam" + myconf="${myconf} --with-dspam-group=dspam" + myconf="${myconf} --with-dspam-home-owner=dspam" + myconf="${myconf} --with-dspam-home-group=dspam" + + # enables support for debugging (touch /etc/dspam/.debug to turn on) + # optional: even MORE debugging output, use with extreme caution! + use debug && myconf="${myconf} --enable-debug --enable-verbose-debug" + + # select storage driver + if use mysql ; then + myconf="${myconf} --with-storage-driver=mysql_drv" + myconf="${myconf} --with-mysql-includes=/usr/include/mysql" + myconf="${myconf} --with-mysql-libraries=/usr/lib/mysql" + myconf="${myconf} --with-client-compression" + + # an experimental feature available with MySQL backend + if use neural ; then + myconf="${myconf} --enable-neural-networking" + fi + else + myconf="${myconf} --with-storage-driver=libdb4_drv" + myconf="${myconf} --with-db4-includes=/usr/include" + myconf="${myconf} --with-db4-libraries=/usr/lib" + fi + + econf ${myconf} || die + emake || die + +} + +src_install () { + # open up perms on /etc/mail/dspam + diropts -m0775 -o dspam -g dspam + dodir ${HOMEDIR} + keepdir ${HOMEDIR} + + # keeps dspam data in /var + diropts -m0770 -o dspam -g dspam + dodir ${DATADIR} + keepdir ${DATADIR} + + # keeps dspam log in /var/log + diropts -m0775 -o dspam -g dspam + dodir ${LOGDIR} + keepdir ${LOGDIR} + + # make install + make DESTDIR=${D} install || die + + # documentation + dodoc CHANGELOG LICENSE README RELEASE.NOTES + dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail + if use mysql ; then + newdoc tools.mysql_drv/README README.MYSQL + fi + + # install some initial configuration + insinto ${HOMEDIR} + insopts -m0640 -o dspam -g dspam + doins ${FILESDIR}/trusted.users + if use cyrus; then + echo "/usr/lib/cyrus/deliver $u" > ${T}/untrusted.mailer_args + elif use exim; then + echo "/usr/sbin/exim -oMr spam-scanned" > ${T}/untrusted.mailer_args + elif use courier; then + echo "/usr/bin/maildrop -d $u" > ${T}/untrusted.mailer_args + elif use procmail; then + echo "/usr/bin/procmail -d $u" > ${T}/untrusted.mailer_args + fi + + # database related configuration and scripts + if use mysql ; then + local PASSWORD="${RANDOM}${RANDOM}${RANDOM}${RANDOM}" + + # Replace some variables in the configuration files + sed -e "s,@HOMEDIR@,${HOMEDIR},g" \ + -e "s,@confdir@,${CONFIGDIR},g" \ + ${FILESDIR}/crontab.mysql > ${T}/dspam.cron + + sed -e "s,@password@,${PASSWORD},g" \ + ${FILESDIR}/mysql.data > ${T}/mysql.data + + sed -e "s,@password@,${PASSWORD},g" \ + ${FILESDIR}/mysql_create_user.sql > ${T}/mysql_setup.sql + cat ${S}/tools.mysql_drv/mysql_objects.sql.${MYSQL_TABLE_TYPE} >> ${T}/mysql_setup.sql + + sed -e "s,@HOMEDIR@,${HOMEDIR},g" \ + -e "s,@confdir@,${CONFIGDIR},g" \ + ${FILESDIR}/mysql_install_db > ${T}/mysql_install_db + + sed -e "s,@HOMEDIR@,${HOMEDIR},g" \ + -e "s,@password@,${PASSWORD},g" \ + -e "s,@confdir@,${CONFIGDIR},g" \ + ${FILESDIR}/mysql_purge_db > ${T}/mysql_purge_db + + insinto ${CONFIGDIR} + insopts -m644 -o dspam -g dspam + doins ${T}/mysql.data + doins ${T}/mysql_setup.sql + doins ${FILESDIR}/upgrade.sql + newins tools.mysql_drv/purge.sql mysql_purge.sql + + exeinto ${CONFIGDIR} + exeopts -m755 -o dspam -g dspam + doexe ${T}/mysql_install_db + doexe ${T}/mysql_purge_db + + einfo "Fresh install: run ${HOMEDIR}/mysql_install_db to setup the dspam database" + einfo "Upgrades from 2.x: See the README for instructions on updating your tables for dspam-3.0" + else + cp ${FILESDIR}/crontab.db4 ${T}/dspam.cron + fi + + # installs the cron job to the cron directory + diropts -m0755 -o dspam -g dspam + dodir /etc/cron.daily + keepdir /etc/cron.daily + exeinto /etc/cron.daily + exeopts -m0755 -o dspam -g dspam + doexe ${T}/dspam.cron + + # installs the logrotation scripts to the logrotate.d directory + diropts -m0755 -o dspam -g dspam + dodir /etc/logrotate.d + keepdir /etc/logrotate.d + insinto /etc/logrotate.d + insopts -m0755 -o dspam -g dspam + newins ${FILESDIR}/logrotate.dspam dspam + + # Symlinks data to HOMEDIR + dosym ${DATADIR} ${HOMEDIR}/data + + # Log files for symlinks + diropts -m0755 -o dspam -g dspam + dodir ${LOGDIR} + keepdir ${LOGDIR} + touch ${D}${LOGDIR}/sql.errors + touch ${D}${LOGDIR}/system.log + touch ${D}${LOGDIR}/dspam.debug + touch ${D}${LOGDIR}/dspam.messages + + # dspam still wants to write to a few files in it's home dir + dosym ${LOGDIR}/sql.errors ${HOMEDIR}/sql.errors + dosym ${LOGDIR}/system.log ${HOMEDIR}/system.log + dosym ${LOGDIR}/dspam.debug ${HOMEDIR}/dspam.debug + dosym ${LOGDIR}/dspam.messages ${HOMEDIR}/dspam.messages +} + +pkg_postinst() { + if use mysql ; then + einfo "To setup dspam to run out-of-the-box on your system with a mysql database, run:" + einfo "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" + fi + if use exim ; then + echo + einfo "To use dspam in conjunction with your exim system, you should read the README" + fi +} + +pkg_config () { + if use mysql ; then + ${CONFIGDIR}/mysql_install_db + mv ${CONFIGDIR}/mysql.data ${HOMEDIR} + fi +} diff --git a/mail-filter/dspam/files/digest-dspam-3.1.0_beta11 b/mail-filter/dspam/files/digest-dspam-3.1.0_beta11 new file mode 100644 index 000000000000..efadddcb0759 --- /dev/null +++ b/mail-filter/dspam/files/digest-dspam-3.1.0_beta11 @@ -0,0 +1 @@ +MD5 2d059a9e94d30c23c8887d0a16892820 dspam-3.1.0.beta.1.1.tar.gz 608509 diff --git a/mail-filter/dspam/files/trusted.users b/mail-filter/dspam/files/trusted.users index 2060d114d907..eeeb26b4d533 100644 --- a/mail-filter/dspam/files/trusted.users +++ b/mail-filter/dspam/files/trusted.users @@ -1,4 +1,3 @@ -apache nobody root -qmailq +apache |