From 589ca3dfeee38dc1a9ec4fab72211fa197986c42 Mon Sep 17 00:00:00 2001 From: Markus Ullmann Date: Sat, 30 Aug 2008 20:32:22 +0000 Subject: Version bump Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.26-gentoo i686 --- mail-filter/MailScanner/ChangeLog | 8 +- .../MailScanner/MailScanner-4.70.7.1.ebuild | 308 +++++++++++++++++++++ mail-filter/MailScanner/Manifest | 10 +- 3 files changed, 321 insertions(+), 5 deletions(-) create mode 100644 mail-filter/MailScanner/MailScanner-4.70.7.1.ebuild (limited to 'mail-filter') diff --git a/mail-filter/MailScanner/ChangeLog b/mail-filter/MailScanner/ChangeLog index 6fadc0815945..6d1d58c790d0 100644 --- a/mail-filter/MailScanner/ChangeLog +++ b/mail-filter/MailScanner/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-filter/MailScanner # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/MailScanner/ChangeLog,v 1.4 2008/08/23 05:56:12 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/MailScanner/ChangeLog,v 1.5 2008/08/30 20:32:22 jokey Exp $ + +*MailScanner-4.70.7.1 (30 Aug 2008) + + 30 Aug 2008; Markus Ullmann + +MailScanner-4.70.7.1.ebuild: + Version bump 23 Aug 2008; Doug Goldstein metadata.xml: add GLEP 56 USE flag desc from use.local.desc diff --git a/mail-filter/MailScanner/MailScanner-4.70.7.1.ebuild b/mail-filter/MailScanner/MailScanner-4.70.7.1.ebuild new file mode 100644 index 000000000000..70063e1361eb --- /dev/null +++ b/mail-filter/MailScanner/MailScanner-4.70.7.1.ebuild @@ -0,0 +1,308 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/MailScanner/MailScanner-4.70.7.1.ebuild,v 1.1 2008/08/30 20:32:22 jokey Exp $ + +inherit eutils versionator + +MY_PV=$(get_version_component_range 1-3 ) +MY_PVR=$(replace_version_separator 3 '-' ) + +DESCRIPTION="Free Anti-Virus and Anti-Spam Filter" +HOMEPAGE="http://www.mailscanner.info/" +SRC_URI="http://www.mailscanner.info/files/4/tar/${PN}-install-${MY_PVR}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="bitdefender clamav doc exim f-prot postfix spamassassin" + +DEPEND="dev-lang/perl" +RDEPEND="${DEPEND} + dev-perl/Archive-Zip + dev-perl/Compress-Zlib + dev-perl/Convert-BinHex + dev-perl/Convert-TNEF + dev-perl/DBD-SQLite + dev-perl/DBI + >=dev-perl/HTML-Parser-3.45 + dev-perl/HTML-Tagset + dev-perl/IO-stringy + >=dev-perl/MIME-tools-5.417 + dev-perl/MailTools + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/TimeDate + dev-perl/Sys-Hostname-Long + dev-perl/Filesys-Df + >=net-mail/tnef-1.4.3 + virtual/perl-File-Spec + virtual/perl-File-Temp + virtual/perl-Getopt-Long + >=virtual/perl-Sys-Syslog-0.18 + >=virtual/perl-MIME-Base64-3.05 + virtual/cron + postfix? ( mail-mta/postfix ) + exim? ( !postfix? ( mail-mta/exim ) ) + !postfix? ( !exim? ( mail-mta/sendmail ) ) + bitdefender? ( app-antivirus/bitdefender-console ) + clamav? ( >=app-antivirus/clamav-0.88.4 ) + f-prot? ( app-antivirus/f-prot ) + spamassassin? ( >=mail-filter/spamassassin-3.1.5 )" + +S="${WORKDIR}/${PN}-${MY_PVR}" +BASE="/usr" + +src_unpack() { + unpack ${A} + unpack ./${PN}-install-${MY_PV}/perl-tar/${PN}-${MY_PVR}.tar.gz + + # setup MTA + if use postfix ; then + RUNASUSER='postfix' + RUNASGROUP='postfix' + INQUEUE='/var/spool/postfix.in/deferred' + OUTQUEUE='/var/spool/postfix/incoming' + MTA='postfix' + SENDMAIL='/usr/lib/sendmail' + SENDMAIL2='/usr/lib/sendmail' + elif use exim ; then + RUNASUSER='mail' + RUNASGROUP='mail' + INQUEUE='/var/spool/exim.in/input' + OUTQUEUE='/var/spool/exim/input' + MTA='exim' + SENDMAIL='/usr/sbin/exim -oMr MailScanner' + SENDMAIL2='/usr/sbin/exim -C /etc/exim/exim_out.conf -oMr MailScanner' + else + # use sendmail as default, but we should add more as needed + # RUNASUSER='mail' + # RUNASGROUP='mail' + INQUEUE='/var/spool/mqueue.in' + OUTQUEUE='/var/spool/mqueue' + MTA='sendmail' + SENDMAIL='/usr/lib/sendmail' + SENDMAIL2='/usr/lib/sendmail' + fi + + # setup virus scanner(s) + VIRUS_SCANNERS="" + use bitdefender && VIRUS_SCANNERS="bitdefender ${VIRUS_SCANNERS}" + use clamav && VIRUS_SCANNERS="clamav ${VIRUS_SCANNERS}" + use f-prot && VIRUS_SCANNERS="f-prot ${VIRUS_SCANNERS}" + + if [ "$VIRUS_SCANNERS" == "" ]; then + VIRUS_SCANNERS="none" + VIRUS_SCANNING="no" + else + VIRUS_SCANNING="yes" + fi + + sed -i \ + -e "s/^\(Virus Scanning[ \t]*=\).*/\1 ${VIRUS_SCANNING}/" \ + -e "s/^\(Virus Scanners[ \t]*=\).*/\1 ${VIRUS_SCANNERS}/" \ + "${S}/etc/MailScanner.conf" + + # setup spamassassin + if use spamassassin ; then + sed -i \ + -e "s/^\(Use SpamAssassin[ \t]*=\).*$/\1 yes/" \ + "${S}/etc/MailScanner.conf" + else + sed -i \ + -e "s/^\(Use SpamAssassin[ \t]*=\).*$/\1 no/" \ + "${S}/etc/MailScanner.conf" + fi + + # update bin files + sed -i \ + -e "s#msbindir=/opt/MailScanner/bin#msbindir=/usr/sbin#g" \ + -e "s#config=/opt/MailScanner/etc/MailScanner.conf#config=/etc/MailScanner/MailScanner.conf#g" \ + "${S}/bin/check_mailscanner" + for each in update_virus_scanners update_phishing_sites update_bad_phishing_sites ; do + sed -i \ + -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \ + "${S}"/bin/${each} + done + sed -i \ + -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/MailScanner#g" \ + "${S}"/bin/update_spamassassin + sed -i \ + -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \ + -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \ + "${S}"/bin/MailScanner + + # update cron files + sed -i \ + -e "s#/opt/MailScanner/bin/check_mailscanner#/usr/sbin/check_MailScanner#g" \ + "${S}"/bin/cron/check_MailScanner.cron + for cronfile in update_virus_scanners.cron update_{,bad_}phishing_sites.cron; do + sed -i \ + -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/mailscanner#g" \ + -e "s#/opt/MailScanner/bin#/usr/sbin#g" \ + "${S}"/bin/cron/${cronfile} + done + + # Determine some things that may need to be changed in conf file + # (need to arrive at sensible replacement for yoursite) + YOURSITE=`dnsdomainname | sed -e "s/\./-/g"` + BASEBIN="${BASE}/sbin" + + # ClamAV requires some specific changes to MailScanner.conf + # when mailscanner is running as root (i.e. sendmail) + if use clamav ; then + if [ "$MTA" == "sendmail" ] ; then + WORKGRP="clamav" + WORKPERM="0640" + else + WORKGRP="" + WORKPERM="0600" + fi + else + WORKGRP="" + WORKPERM="0600" + fi + + # update conf files + sed -i \ + -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \ + -e "s#/opt/MailScanner/bin#$BASEBIN#g" \ + -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \ + -e "s#^\(Run As User[ \t]*=\).*#\1 $RUNASUSER#" \ + -e "s#^\(Run As Group[ \t]*=\).*#\1 $RUNASGROUP#" \ + -e "s#^\(Incoming Queue Dir[ \t]*=\).*#\1 $INQUEUE#" \ + -e "s#^\(Outgoing Queue Dir[ \t]*=\).*#\1 $OUTQUEUE#" \ + -e "s#^\(MTA[ \t]*=\).*#\1 $MTA#" \ + -e "s/^#\(TNEF.*internal\)$/\1/" \ + -e "s/^\(TNEF.*0000\)$/#\1/" \ + -e "s#^\(PID file[ \t]=\).*#\1 /var/run/mailscanner.pid#" \ + -e "s#^\(%org-name%\)[ \t]*=.*#\1 = ${YOURSITE}#" \ + -e "s#^\(Sendmail[ \t]*=\).*#\1 ${SENDMAIL}#" \ + -e "s#^\(Sendmail2[ \t]*=\).*#\1 ${SENDMAIL2}#" \ + -e "s#^\(Incoming Work Group[ \t]*=\).*#\1 ${WORKGRP}#" \ + -e "s#^\(Incoming Work Permissions[ \t]*=\).*#\1 ${WORKPERM}#" \ + "${S}/etc/MailScanner.conf" + + # update spam.assassin.prefs.conf + sed -i -e "s#YOURDOMAIN-COM#${YOURSITE}#" ${S}/etc/spam.assassin.prefs.conf + + # net-mail/clamav net-mail/f-prot package compatibility + sed -i \ + -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#" \ + -e 's#^\(clamav\t.*/usr\)/local$#\1#' \ + -e 's#^\(f-prot.*\)/usr/local/f-prot$#\1/opt/f-prot#' \ + "${S}/etc/virus.scanners.conf" + + # update lib files + sed -i \ + -e "s#/opt/MailScanner/bin#$BASEBIN#g" \ + -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \ + -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \ + "${S}/lib/MailScanner/ConfigDefs.pl" + sed -i \ + -e "s#/etc/MailScanner#/etc/MailScanner#g" \ + "${S}/lib/MailScanner/CustomConfig.pm" + + # finally, change MailScanner.conf into MailScanner.conf.sample + cp "${S}/etc/MailScanner.conf" "${S}/etc/MailScanner.conf.${MY_PV}" + mv "${S}/etc/MailScanner.conf" "${S}/etc/MailScanner.conf.sample" + +} + +src_install() { + exeinto ${BASE}/sbin + doexe bin/MailScanner + newexe bin/check_mailscanner check_MailScanner + doexe bin/d2mbox bin/df2mbox + doexe bin/update_virus_scanners + doexe bin/upgrade_MailScanner_conf + doexe bin/update_bad_phishing_sites bin/update_phishing_sites + newexe bin/Sophos.install.linux Sophos.install + + insinto /etc/MailScanner + doins etc/*.conf + doins etc/mailscanner.conf.with.mcp + doins etc/MailScanner.conf.${MY_PV} + doins etc/MailScanner.conf.sample + + insinto /etc/MailScanner/rules + doins etc/rules/* + insinto /etc/MailScanner/mcp + doins etc/mcp/* + + insinto /etc/MailScanner + doins -r etc/reports + + insinto ${BASE}/$(get_libdir)/MailScanner + doins lib/*.prf + + exeinto ${BASE}/$(get_libdir)/MailScanner + doexe lib/*-wrapper + doexe lib/*-autoupdate + doexe lib/*-autoupdate.old + doexe lib/*.pm + + exeinto ${BASE}/$(get_libdir)/MailScanner/MailScanner + doexe lib/MailScanner/*.pm + doexe lib/MailScanner/*.pl + + insinto ${BASE}/$(get_libdir)/MailScanner/MailScanner + doins lib/MailScanner/*.txt + + exeinto ${BASE}/$(get_libdir)/MailScanner/MailScanner/CustomFunctions + doexe lib/MailScanner/CustomFunctions/MyExample.pm + + newinitd "${FILESDIR}"/initd.mailscanner MailScanner + newconfd "${FILESDIR}"/confd.mailscanner MailScanner + + #Set up cron jobs + exeinto /etc/cron.hourly + newexe "${S}/bin/cron/check_MailScanner.cron" check_MailScanner + for cronfile in update_{virus_scanners,{bad_,}phishing_sites}; do + newexe "${S}/bin/cron/${cronfile}.cron" ${cronfile} + done + + exeinto /etc/cron.daily + newexe "${S}/bin/cron/clean.quarantine.cron" clean.quarantine + + dodoc README + insinto /usr/share/doc/${PF} + doins MailScanner.conf.index.html + + keepdir /var/spool/MailScanner/incoming + keepdir /var/spool/MailScanner/quarantine + keepdir /var/spool/MailScanner/spamassassin + keepdir /var/spool/MailScanner/archive + keepdir ${BASE}/var + + if use postfix ; then + chown -R postfix:postfix "${D}/var/spool/MailScanner/" + elif use exim ; then + chown -R mail:mail "${D}/var/spool/MailScanner/" + else + keepdir /var/spool/mqueue.in + fi + use spamassassin && dosym /etc/MailScanner/spam.assassin.prefs.conf /etc/mail/spamassassin/mailscanner.cf + +} + +pkg_postinst() { + if use postfix; then + elog "Note that postfix 2.4 now supports HOLD of messages" + elog "and reinjection without second postfix instance" + elog "Inbound path is now ${ROOT}var/spool/postfix/hold" + elog + elog "See http://mailscanner.info/postfix.html for details" + elog "or check (english) gentoo-wiki.com page which has been updated" + fi + + if [ -f "/etc/MailScanner/MailScanner.conf" ]; then + einfo "Upgrading the MailScanner.conf file" + cp /etc/MailScanner/MailScanner.conf /etc/MailScanner/MailScanner.conf.pre_upgrade.${MY_PV} + /usr/sbin/upgrade_MailScanner_conf \ + /etc/MailScanner/MailScanner.conf.pre_upgrade.${MY_PV} \ + /etc/MailScanner/MailScanner.conf.${MY_PV} \ + > /etc/MailScanner/MailScanner.conf 2> /dev/null + else + cp /etc/MailScanner/MailScanner.conf.sample /etc/MailScanner/MailScanner.conf + fi +} diff --git a/mail-filter/MailScanner/Manifest b/mail-filter/MailScanner/Manifest index 9f98308c62ec..9bea9790b969 100644 --- a/mail-filter/MailScanner/Manifest +++ b/mail-filter/MailScanner/Manifest @@ -5,14 +5,16 @@ AUX confd.mailscanner 147 RMD160 2472095d115d136498f93a6dca3ce540e335222f SHA1 3 AUX initd.mailscanner 756 RMD160 f75589025bbe9e7a3bc2f10a4a5eadab11f8d36a SHA1 cb4c505b3c9f4f993b656b6c96c6992ae00be5e0 SHA256 ba63aec0dae9c820b533d467c3325ada70a4b73761bed2207d10814f82f31b65 DIST MailScanner-install-4.67.6-1.tar.gz 8128173 RMD160 6a38ba6dd02cd90ebb887c6146485cbc771a3643 SHA1 51d08b364566bc902a1d3d91386c479b5f6e68ef SHA256 e0c803a6c3b243aa19b7e6bbac009617c02a308bc394eb64615e2148ac5d72e1 DIST MailScanner-install-4.68.6-1.tar.gz 8317710 RMD160 177925005204bd150e370c7000a4af3f19fee1f8 SHA1 4408785bfa93441e52ecb0962b2e70c0b76b1670 SHA256 1d0ad342a87c11caea1718e867eff42574e1db86ca6cb7065564a4d5ee1c640c +DIST MailScanner-install-4.70.7-1.tar.gz 8329186 RMD160 245e3e5f06f90d227a76bd7b4c28763ee2c06cdb SHA1 1e54cb379de9f79e4f4014bf2d91e1db878bb422 SHA256 b5d7487438dfd1559a4e8b6c6f42839a4fe87170760e3661002cc5f31ece4cc2 EBUILD MailScanner-4.67.6.1-r2.ebuild 9458 RMD160 cd0e3022e0314f45e88113f5a2f8af55f59f1dee SHA1 cd0c6a0a79b2d9d74698611ab0f12351822b6339 SHA256 99fef7798eb28324c75bb9595b46a36f5e2abf4966dfee8869dce06a1d8e0cbd EBUILD MailScanner-4.68.6.1.ebuild 9455 RMD160 78334696f3cdb0330bb55df48817c0a1451066a7 SHA1 f14b3cf691f3ffb74810947b55aa29034b3a98d3 SHA256 d91491990d42dbe1735e4948b9b39a9e272af42cb94db245d892f8a5e3716410 -MISC ChangeLog 2358 RMD160 ed46999d173224cc6b213b986b12e8c4b789354f SHA1 87bcff446edb9a9f62ed5670fc860e673574e048 SHA256 07c62494f1e7a6f2c4f5bebafe4fe9c8e6dccd96a39a187013be10b812d4ac31 +EBUILD MailScanner-4.70.7.1.ebuild 9455 RMD160 e0cc2ef0645c206491a7b8a4285fbae083b430b0 SHA1 0cabd0d1a0938e6d18737fb8f2679b914812774f SHA256 fae8cb5cbf5c1daa8112d3608d53958521bf09cb6212454d3a3191e79d4f5333 +MISC ChangeLog 2491 RMD160 1e284f59df7120cd40931fd4cf62ded0ce8ffaf6 SHA1 f2e487770d8666b40c88d022a7d018b2665baa14 SHA256 08fddf25b2477316667f0715e7e83803164a3d867499e3b320e40780b4ab05bd MISC metadata.xml 674 RMD160 7d6286c3defa5783cec202d8245de8b9a2b75c0e SHA1 31ad43a67667f05eeca6335c4089040d6ff7630a SHA256 039826848019c63c03fca640c58f6c04e9c80dbb66ccca4533822370d1c7be33 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkivpoEACgkQoeSe8B0zEfx/gQCfbpPAGMHP35qLrbCMCsvN976o -PbcAn2ij8CpnTmemyltftWx1fpn+cG8V -=KWN1 +iEYEARECAAYFAki5rlQACgkQz974XjDVpbl5FQCgw8hV3UD4eMmQYWI+tll/mDSJ +ExUAnR//xUBQ9Dx++yfp2BdSncQRaelP +=Yxq0 -----END PGP SIGNATURE----- -- cgit v1.2.3-65-gdbad