summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ullmann <jokey@gentoo.org>2008-01-28 17:17:22 +0000
committerMarkus Ullmann <jokey@gentoo.org>2008-01-28 17:17:22 +0000
commitb84c54447dd20fa435f67f6260734f354fc1cdb4 (patch)
tree747b71c4dd1ff61b85418e6555955509d4cb488a /mail-filter
parentnet-p2p/thaw: New ebuild for bug 207635 (diff)
downloadsunrise-b84c54447dd20fa435f67f6260734f354fc1cdb4.tar.gz
sunrise-b84c54447dd20fa435f67f6260734f354fc1cdb4.tar.bz2
sunrise-b84c54447dd20fa435f67f6260734f354fc1cdb4.zip
mail-filter/MailScanner: Version bump -- try me first before killing old version
svn path=/sunrise/; revision=5543
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/MailScanner/ChangeLog5
-rw-r--r--mail-filter/MailScanner/MailScanner-4.66.5.3.ebuild309
-rw-r--r--mail-filter/MailScanner/Manifest4
3 files changed, 316 insertions, 2 deletions
diff --git a/mail-filter/MailScanner/ChangeLog b/mail-filter/MailScanner/ChangeLog
index f4c10ca38..40896ca0d 100644
--- a/mail-filter/MailScanner/ChangeLog
+++ b/mail-filter/MailScanner/ChangeLog
@@ -1,7 +1,10 @@
# ChangeLog for mail-filter/MailScanner
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 27 Jan 2008; Markus Ullmann <jokey@gentoo.org> Manifest:
+ Version bump -- try me first before killing old version
+
06 Jan 2007; Jakub Moc <jakub@gentoo.org> MailScanner-4.57.6.1.ebuild:
Nuke bogus sendmail use flag and fix dependencies
diff --git a/mail-filter/MailScanner/MailScanner-4.66.5.3.ebuild b/mail-filter/MailScanner/MailScanner-4.66.5.3.ebuild
new file mode 100644
index 000000000..2b9780876
--- /dev/null
+++ b/mail-filter/MailScanner/MailScanner-4.66.5.3.ebuild
@@ -0,0 +1,309 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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
+ >=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
+
+ # update init script parameters for selected MTA
+ sed \
+ -e "s|^\(MTA=\).*|\1${MTA}|g" \
+ "${FILESDIR}/confd.mailscanner-mta" > "${S}/confd.mailscanner-mta"
+
+ # 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"
+ sed -i \
+ -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
+ "${S}/bin/update_virus_scanners"
+ 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"
+
+ # 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
+ newinitd "${FILESDIR}"/initd.mailscanner-mta MailScanner-mta
+ newconfd "${FILESDIR}"/confd.mailscanner MailScanner
+ newconfd "${S}"/confd.mailscanner-mta MailScanner-mta
+
+ #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
+}
+
+pkg_postinst() {
+ if [ -n "`grep -xE "[[:space:]]*provide[[:space:]]+(.*[[:space:]]+)*mta([[:space:]]+.*)*" /etc/init.d/${MTA}`" ]; then
+ ewarn
+ ewarn "Warning: your mta service startup script /etc/init.d/${MTA}"
+ ewarn "seems to provide 'mta', this may give problems with /etc/init.d/MailScanner-mta."
+ ewarn
+ ewarn "The Installation is *NOT* Completed Yet, You still need Filesystem::Df"
+ ewarn "Please use emerge g-cpan and run the following command"
+ ewarn
+ ewarn " # g-cpan -i Filesys::Df "
+ ewarn
+
+ echo
+ 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 8af448b30..bad24728c 100644
--- a/mail-filter/MailScanner/Manifest
+++ b/mail-filter/MailScanner/Manifest
@@ -3,6 +3,8 @@ AUX confd.mailscanner-mta 967 RMD160 f904b49b7ab3c8b988365f16e7629a14d044cb25 SH
AUX initd.mailscanner 1033 RMD160 bd76c4a6fb1ad24c69c0938f851d791779fd4745 SHA1 8cf8da446e9633211097a9f1f466a52f6ca00add SHA256 c4dd01839ef574e4c6acbab02bafadfe36991531de384ea895917aae618d2413
AUX initd.mailscanner-mta 5768 RMD160 f1135b2a2d20bdf5c71117b65a721519c7bd1cfb SHA1 99a559c81dc24da63ad1be6f05c8506976a36877 SHA256 c14193071b0f1343f666a09adaff4b67ee6ee4afb223650bf63d6052bed386ec
DIST MailScanner-install-4.57.6-1.tar.gz 7051901 RMD160 db7823fcbdb2974e29281518d011fbf84ff338e1 SHA1 d7e2ad6732a9a1055809754e1d3503a4c86f0dad SHA256 52cbacb22c6a82fc39b2aef89b74774e504bb8d4baf5530c225369b08ee52754
+DIST MailScanner-install-4.66.5-3.tar.gz 8129467 RMD160 cf7054c78f79058f90df80cfcb3c0c22a973ff92 SHA1 df7d4cadcebdf0091087faf74a7087463767b09d SHA256 c1b62b291c0b95e85f2d90cf7d100d083ee06ad45993d4acbf415ccc08d3b099
EBUILD MailScanner-4.57.6.1.ebuild 9649 RMD160 1a656b2f7d334a4e7e5c88d48474a3268182ad85 SHA1 d8ec8ef057b10f24fb674d61820aba158c36b26c SHA256 77fc0eb1e1245ab2e1c07ccdc4c33a92a2cf51a5facc620c3aacb21a25b382d7
-MISC ChangeLog 1031 RMD160 914cb7e74885afb0c0e20f37f0af4a14bc3fa5f9 SHA1 dd459f7a76ce27fca02eca10d9eee54f7f1ad3de SHA256 c0a8e84706a290bd8fb0fa83b3eb1005540bf07c6bfb34b261b225835d5502ae
+EBUILD MailScanner-4.66.5.3.ebuild 9450 RMD160 0b637f64461f8ed3d18898ecdb8c0fcc2e7d30c0 SHA1 99df7776995bdc73185947063ef12da809b0263d SHA256 df0aa7b33b704f9ba0cfb2ba44c1d13b715cbcff58d4f2740826135ef406d6bf
+MISC ChangeLog 1149 RMD160 e65ece80fda0f7e657c0cd0ed0e7d43470aea7b1 SHA1 7eabaabddb092ceeb06e21f333fa581148033f38 SHA256 e01bcd7e75778bae583aca7c2e30bf28e5f54d636995a66b582e852fd4d24429
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42