summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Thomson <wltjr@gentoo.org>2006-11-20 00:19:52 +0000
committerWilliam Thomson <wltjr@gentoo.org>2006-11-20 00:19:52 +0000
commit1a39c6a233dac9a1bf1a58f558b114b635312bbe (patch)
tree29f0227ad87d4e02b0e6ceadd6570e822ebfe53f /mail-filter
parentAdd ~x86-fbsd keyword. (diff)
downloadgentoo-2-1a39c6a233dac9a1bf1a58f558b114b635312bbe.tar.gz
gentoo-2-1a39c6a233dac9a1bf1a58f558b114b635312bbe.tar.bz2
gentoo-2-1a39c6a233dac9a1bf1a58f558b114b635312bbe.zip
A few more sed tweaks. Also filtering all files for pc line returns due to project devs being on windows I believe :(. Don't hold that against them. Thanks again to ovaron2.
(Portage version: 2.1.2_rc1-r6)
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/assp/ChangeLog10
-rw-r--r--mail-filter/assp/assp-1.2.5-r2.ebuild160
-rw-r--r--mail-filter/assp/files/digest-assp-1.2.5-r23
3 files changed, 172 insertions, 1 deletions
diff --git a/mail-filter/assp/ChangeLog b/mail-filter/assp/ChangeLog
index c953aedf4c5b..53bcce6f01c6 100644
--- a/mail-filter/assp/ChangeLog
+++ b/mail-filter/assp/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for mail-filter/assp
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/assp/ChangeLog,v 1.3 2006/11/19 17:32:39 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/assp/ChangeLog,v 1.4 2006/11/20 00:19:52 wltjr Exp $
+
+*assp-1.2.5-r2 (20 Nov 2006)
+
+ 20 Nov 2006; William L. Thomson Jr. <wltjr@gentoo.org>
+ +assp-1.2.5-r2.ebuild:
+ A few more sed tweaks. Also filtering all files for pc line returns due to
+ project devs being on windows I believe :(. Don't hold that against them.
+ Thanks again to ovaron2.
*assp-1.2.5-r1 (19 Nov 2006)
diff --git a/mail-filter/assp/assp-1.2.5-r2.ebuild b/mail-filter/assp/assp-1.2.5-r2.ebuild
new file mode 100644
index 000000000000..d72d930f2a17
--- /dev/null
+++ b/mail-filter/assp/assp-1.2.5-r2.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/assp/assp-1.2.5-r2.ebuild,v 1.1 2006/11/20 00:19:52 wltjr Exp $
+
+inherit eutils
+
+DESCRIPTION="Anti-Spam SMTP Proxy written in Perl."
+HOMEPAGE="http://assp.sourceforge.net/"
+MY_PN=ASSP
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}_${PV}-Install.zip"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="ldap spf srs"
+
+DEPEND="app-arch/unzip"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Net-DNS
+ dev-perl/File-ReadBackwards
+ dev-perl/Compress-Zlib
+ dev-perl/Email-Valid
+ virtual/perl-Digest-MD5
+ perl-core/Time-HiRes
+ spf? ( dev-perl/Mail-SPF-Query )
+ srs? ( dev-perl/Mail-SRS )
+ ldap? ( dev-perl/perl-ldap )"
+
+S=${WORKDIR}/${MY_PN}
+
+pkg_setup() {
+ enewgroup assp
+ enewuser assp -1 -1 /dev/null assp
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Replace path for assp.pl to find data files
+ # Convert PC line returns to Unix
+ sed -i -e "/foreach /s:('.':('/var/lib/assp/':" \
+ -e 's:$base/$pidfile:/var/run/assp/$pidfile:' \
+ -e "s:'pid':'asspd.pid':" \
+ -e "s:'maillog.txt':'/var/log/assp/maillog.txt':" \
+ -e 's:"maillog.log":"/var/log/assp/maillog.log":' \
+ -e 's:"$base/$logdir":"$logdir":' \
+ -e 's:$base/$logfile:$logfile:' \
+ -e 's:$base/assp.cfg:/etc/assp/assp.cfg:' \
+ -e 's:$base/assp.cfg:/etc/assp/assp.cfg:' \
+ -e 's:"$base/$archivelogfile":"$archivelogfile":' \
+ -e 's:$base/images:/usr/share/assp/images:' \
+ -e 's:$fil="$base/$fil";:$fil="/usr/share/assp/$fil";:' \
+ -e 's:"$base/$maillog/:"/var/lib/assp/$maillog/:' \
+ -e "/AsADaemon,'As a Daemon',0,checkbox/s:checkbox,0,:checkbox,1,:" \
+ -e "s:runAsUser,'Run as UID',20,textinput,'':runAsUser,'Run as UID',20,textinput,'assp':" \
+ -e "s:runAsGroup,'Run as GID',20,textinput,'':runAsGroup,'Run as GID',20,textinput,'assp':" \
+ -e ":[AvPath,':s:'':/var/lib/clamav/:" \
+ -e 's/\r//' \
+ "${S}"/assp.pl || die "sed failed"
+
+# Security fix - allow only css/gif/jpg/png files
+# -e '/($fil=/s:$fil=.*):$fil!~/usr/share/assp/.*\\.(css|gif|jpg|png)$/i):' \
+
+ # move2num.pl
+ sed -i -e 's:assp.cfg:/etc/assp/assp.cfg:' \
+ -e 's/\r//' \
+ "${S}/move2num.pl" || die "sed failed"
+
+ # rebuildspamdb.pl
+ sed -i -e 's:assp.cfg:/etc/assp/assp.cfg:' \
+ -e "s:'maillog.txt';::" \
+ -e 's:$Log=$Config{logfile} && "$Config{base}/$Config{logfile}" || :$Log=$Config{logfile};:' \
+ -e 's/\r//' \
+ "${S}/rebuildspamdb.pl" || die "sed failed"
+
+ # Replace path for default maillog.log
+ sed -i -e 's:tail -300 -f /usr/local/assp/maillog.log:tail -n 300 -f /var/log/assp/maillog.txt:'
+ -e 's/\r//' \
+ "${S}/stats.sh" || die "sed failed"
+
+ # just being safe, same sed stuff called on all modified files above
+ edos2unix "${S}/freshclam.sh"
+ edos2unix "${S}/repair.pl"
+ edos2unix "${S}/stat.pl"
+
+ # rename utils
+ mv "${S}/freshclam.sh" "${S}/asspfreshclam.sh"
+ mv "${S}/move2num.pl" "${S}/asspmove2num.pl"
+ mv "${S}/rebuildspamdb.pl" "${S}/assprebuildspamdb.pl"
+ mv "${S}/repair.pl" "${S}/assprepair.pl"
+ mv "${S}/stats.sh" "${S}/asspstats.sh"
+ mv "${S}/stat.pl" "${S}/asspstat.pl"
+
+ # remove windows stuff
+ rm "${S}/addservice.pl"
+ rm -f "${S}/Win32-quickstart-guide.txt"
+}
+
+src_install() {
+ # Configuration directory
+ dodir /etc/assp
+ fowners assp:assp /etc/assp
+ fperms 770 /etc/assp
+
+ # Setup directories for mail to be stored for filter
+ keepdir /var/lib/assp/spam /var/lib/assp/notspam
+ keepdir /var/lib/assp/errors/spam /var/lib/assp/errors/notspam
+
+ # Logs directory
+ keepdir /var/log/assp
+ fowners assp:assp -R /var/log/assp
+ fperms 770 /var/log/assp
+
+ # Install the app
+ exeinto /usr/share/assp
+ doexe *.pl *.sh
+ insinto /usr/share/assp
+ doins -r images/
+ insinto /var/lib/assp
+ doins *.txt *.sav
+
+ # Lock down the files/data
+ fowners assp:assp -R /usr/share/assp
+ fperms 770 /usr/share/assp
+
+ # Data storage
+ fowners assp:assp -R /var/lib/assp
+ fperms 770 /var/lib/assp
+
+ # PID directory
+ dodir /var/run/assp
+ keepdir /var/run/assp
+ fowners assp:assp -R /var/run/assp
+ fperms 770 /var/run/assp
+
+ # Install the init.d script to listen
+ newinitd "${FILESDIR}/asspd.init" asspd
+
+ dohtml *.htm
+}
+
+pkg_postinst() {
+ elog
+ elog "To configure ASSP, start /etc/init.d/asspd then point"
+ elog "your browser to http://localhost:55555"
+ elog "Username: admin Password: nospam4me (CHANGE ASAP!)"
+ elog
+ elog "File permissions have been set to use assp:assp"
+ elog "with mode 770 on directories. When you configure"
+ elog "ASSP, make sure and use the user assp."
+ elog
+ elog "Don't change any path related options."
+ elog
+ elog "All utilities are prefixed with assp."
+ elog
+ elog "See the on-line docs for a complete tutorial."
+ elog
+}
diff --git a/mail-filter/assp/files/digest-assp-1.2.5-r2 b/mail-filter/assp/files/digest-assp-1.2.5-r2
new file mode 100644
index 000000000000..b1a96621e5e7
--- /dev/null
+++ b/mail-filter/assp/files/digest-assp-1.2.5-r2
@@ -0,0 +1,3 @@
+MD5 ffbb815b24ea5073000dd50143edc311 ASSP_1.2.5-Install.zip 244225
+RMD160 748798f39918e6519be755d8e44a288fc82d636c ASSP_1.2.5-Install.zip 244225
+SHA256 282325e0434ef8554fe281a2b25267fde99254ea83bc7073c2acfbc47c2d31af ASSP_1.2.5-Install.zip 244225