diff options
author | Chan Min Wai (dcmwai) <dcmwai@gmail.com> | 2006-10-05 06:56:57 +0000 |
---|---|---|
committer | Chan Min Wai (dcmwai) <dcmwai@gmail.com> | 2006-10-05 06:56:57 +0000 |
commit | e1c14f1e5e9b182a73556cb47c0a97e908546a82 (patch) | |
tree | 5d3f45be936218a6b6b3f8d720b899ff0dee0f44 /mail-filter | |
parent | dev-util/nsis: better error message (diff) | |
download | sunrise-reviewed-e1c14f1e5e9b182a73556cb47c0a97e908546a82.tar.gz sunrise-reviewed-e1c14f1e5e9b182a73556cb47c0a97e908546a82.tar.bz2 sunrise-reviewed-e1c14f1e5e9b182a73556cb47c0a97e908546a82.zip |
mail-filter/MailScanner: Version Pumb 4.55.10.3
svn path=/sunrise/; revision=1394
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/MailScanner/ChangeLog | 4 | ||||
-rw-r--r-- | mail-filter/MailScanner/MailScanner-4.55.10.3.ebuild | 338 | ||||
-rw-r--r-- | mail-filter/MailScanner/Manifest | 16 | ||||
-rw-r--r-- | mail-filter/MailScanner/files/digest-MailScanner-4.55.10.3 | 3 |
4 files changed, 357 insertions, 4 deletions
diff --git a/mail-filter/MailScanner/ChangeLog b/mail-filter/MailScanner/ChangeLog index e8197411d..c3c73563a 100644 --- a/mail-filter/MailScanner/ChangeLog +++ b/mail-filter/MailScanner/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 05 Oct 2006; Chan Min Wai (dcmwai) <dcmwai@gmail.com> + +MailScanner-4.55.10.3.ebuild: + Version Pumb 4.55.10.3 + 02 Jul 2006; Markus Ullmann <jokey@gentoo.org> ChangeLog: Minor QA fix diff --git a/mail-filter/MailScanner/MailScanner-4.55.10.3.ebuild b/mail-filter/MailScanner/MailScanner-4.55.10.3.ebuild new file mode 100644 index 000000000..219a697c3 --- /dev/null +++ b/mail-filter/MailScanner/MailScanner-4.55.10.3.ebuild @@ -0,0 +1,338 @@ +# Copyright 1999-2006 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.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/${PN}-install-${MY_PVR}.tar.gz" + +KEYWORDS="~x86" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="dev-lang/perl" + +RDEPEND="dev-lang/perl + 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 + perl-core/File-Spec + perl-core/File-Temp + perl-core/Getopt-Long + >=perl-core/Sys-Syslog-0.18 + >=perl-core/MIME-Base64-3.05 + || ( + sendmail? ( mail-mta/sendmail ) + postfix? ( mail-mta/postfix ) + exim? ( mail-mta/exim ) + mail-mta/sendmail + ) + clamav? ( >=app-antivirus/clamav-0.88.4 ) + f-prot? ( app-antivirus/f-prot ) + vlnx? ( app-antivirus/vlnx ) + bitdefender? ( app-antivirus/bitdefender-console ) + spamassassin? ( >=mail-filter/spamassassin-3.1.5 ) + virtual/cron" + +IUSE="postfix sendmail exim clamav vlnx spamassassin f-prot bitdefender doc" + +S="${WORKDIR}/MailScanner-${MY_PV}" +BASE="/usr" + +src_unpack() { + unpack ${A} + unpack ./MailScanner-install-${MY_PV}/perl-tar/MailScanner-${MY_PVR}.tar.gz +} + +src_compile() { + cd "${S}" + # 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="" + if use clamav ; then + VIRUS_SCANNERS="clamav ${VIRUS_SCANNERS}" + fi + if use vlnx ; then + VIRUS_SCANNERS="mcafee ${VIRUS_SCANNERS}" + fi + if use f-prot ; then + VIRUS_SCANNERS="f-prot ${VIRUS_SCANNERS}" + fi + if use bitdefender ; then + VIRUS_SCANNERS="bitdefender ${VIRUS_SCANNERS}" + fi + 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 + sed -i \ + -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/mailscanner#g" \ + -e "s#/opt/MailScanner/bin/update_virus_scanners#/usr/sbin/update_virus_scanners#g" \ + ${S}/bin/cron/update_virus_scanners.cron + + # 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/vlnx net-mail/clamav net-mail/f-prot package compatibility + + sed -i -e "s#PREFIX=/usr/local/uvscan#PREFIX=/opt/vlnx#" ${S}/lib/mcafee-autoupdate + sed -i \ + -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#" \ + -e 's#^\(mcafee.*\)/usr/local/uvscan$#\1/opt/vlnx#' \ + -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() { + cd ${S} + exeinto ${BASE}/sbin + #newexe bin/check_mailscanner.linux check_MailScanner + newexe bin/check_mailscanner check_MailScanner + doexe bin/df2mbox + doexe bin/MailScanner + doexe bin/update_virus_scanners + doexe bin/upgrade_MailScanner_conf + 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/* + + for i in $(ls etc/reports/) + do + if [ $i != "cat" ] + then + insinto /etc/MailScanner/reports/$i + doins etc/reports/$i/* + fi + done + + insinto ${BASE}/lib/MailScanner + doins lib/*.prf + + exeinto ${BASE}/lib/MailScanner + doexe lib/*-wrapper + doexe lib/*-autoupdate + doexe lib/*-autoupdate.old + doexe lib/*.pm + + exeinto ${BASE}/lib/MailScanner/MailScanner + doexe lib/MailScanner/*.pm + doexe lib/MailScanner/*.pl + + insinto ${BASE}/lib/MailScanner/MailScanner + doins lib/MailScanner/*.txt + + exeinto ${BASE}/lib/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 + newexe ${S}/bin/cron/update_virus_scanners.cron update_virus_scanners + + exeinto /etc/cron.daily + newexe ${S}/bin/cron/clean.quarantine.cron clean.quarantine + + if use doc ; then + dodir /usr/share/doc/${PF}/html + cp -r docs/* "${D}"usr/share/doc/${PF}/html + fi + + dodoc notes.txt docs/QuickInstall.txt docs/README.sql-logging + + 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 + elog "Remove the line containing 'provide mta' from your MTA's init script" + elog "and take care that using etc-update will not insert this line after" + elog "re-emerging / updating your mta!" + elog "The related bug in bugs.gentoo.org is #46897" + echo + + 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 eef47d057..15f958c07 100644 --- a/mail-filter/MailScanner/Manifest +++ b/mail-filter/MailScanner/Manifest @@ -15,14 +15,19 @@ MD5 8b4e53105f4fabeaafc7a0a4ec06a666 files/initd.mailscanner-mta 5768 RMD160 f1135b2a2d20bdf5c71117b65a721519c7bd1cfb files/initd.mailscanner-mta 5768 SHA256 c14193071b0f1343f666a09adaff4b67ee6ee4afb223650bf63d6052bed386ec files/initd.mailscanner-mta 5768 DIST MailScanner-install-4.54.6-1.tar.gz 8841175 RMD160 fb86266ae46d5d2dd266bc196c48d8e652189bc3 SHA1 12a8784a27387bda7e2947c7d647e124301eccfe SHA256 34c65d72a766ce1687963ab91239ecd4024a3f2b156a6c634b30cae4edca035b +DIST MailScanner-install-4.55.10-3.tar.gz 7047731 RMD160 e4ce718f90c869e5fbe02faf56da372255779ef2 SHA1 820ad14c9006d9363a3cd258073a242cad2d5872 SHA256 1d638c903045834f6055ee376181f068d6eb006024202d786bfbb98ba4047b8d EBUILD MailScanner-4.54.6.1.ebuild 9661 RMD160 9f808833a4df6641655212df33f339b60a546a2f SHA1 0d9499a2ec4a572b973709ef4a9964f19e2476e4 SHA256 454624c0502bbd0848f3be6c8fcdeed45ad10ff39c76e9a094a579fc193e3d80 MD5 87d3b3669eee0cc14b19563e49c0bc21 MailScanner-4.54.6.1.ebuild 9661 RMD160 9f808833a4df6641655212df33f339b60a546a2f MailScanner-4.54.6.1.ebuild 9661 SHA256 454624c0502bbd0848f3be6c8fcdeed45ad10ff39c76e9a094a579fc193e3d80 MailScanner-4.54.6.1.ebuild 9661 -MISC ChangeLog 320 RMD160 1660291538da2efa3079dc07e5d479e83b58301f SHA1 e57266e065ec8281d76c8c3f2539aed7b3800840 SHA256 e225856b0e0a6e80a236806a1e03a05c8599466f060081c8fef09c4e9ca8f72c -MD5 ba06979aece3dc74c0e23222be05d10f ChangeLog 320 -RMD160 1660291538da2efa3079dc07e5d479e83b58301f ChangeLog 320 -SHA256 e225856b0e0a6e80a236806a1e03a05c8599466f060081c8fef09c4e9ca8f72c ChangeLog 320 +EBUILD MailScanner-4.55.10.3.ebuild 9983 RMD160 b8925cdd5557875fa914f609f76da57dd64d9141 SHA1 256f9aad59363743386a594d89bd4d1ffd496129 SHA256 ce74d82582dcc962e4700ddd8a1928e6d214f3391073d60d576f0dbb0c50be34 +MD5 8819f6ad9fe2731f9a68d8418cf67fed MailScanner-4.55.10.3.ebuild 9983 +RMD160 b8925cdd5557875fa914f609f76da57dd64d9141 MailScanner-4.55.10.3.ebuild 9983 +SHA256 ce74d82582dcc962e4700ddd8a1928e6d214f3391073d60d576f0dbb0c50be34 MailScanner-4.55.10.3.ebuild 9983 +MISC ChangeLog 435 RMD160 bc5a7562e03b74110f6dc80536ca0ebb008e0179 SHA1 d07483577e4f781c18e34783d72a1f8f6462003e SHA256 3f0c5592c63e8ff7f0d334180f658e4244808e23e7a94ac478af4606ee73f098 +MD5 8b63c9544382904eef1d234338591b3e ChangeLog 435 +RMD160 bc5a7562e03b74110f6dc80536ca0ebb008e0179 ChangeLog 435 +SHA256 3f0c5592c63e8ff7f0d334180f658e4244808e23e7a94ac478af4606ee73f098 ChangeLog 435 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 MD5 1e678929a9fec6632e227bdf2262e9a1 metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 metadata.xml 170 @@ -30,3 +35,6 @@ SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 metadata MD5 c91ba57a5ace5df4e601bbe4b27faad9 files/digest-MailScanner-4.54.6.1 289 RMD160 dc7f937c14fdc80c152590cd24f96c608cbc073e files/digest-MailScanner-4.54.6.1 289 SHA256 211c31173ac13376084ae553705a0173e75a08a8136040fab70eee22d4596b5c files/digest-MailScanner-4.54.6.1 289 +MD5 ed90fc07316e205940b2cc37ecd25072 files/digest-MailScanner-4.55.10.3 292 +RMD160 6b346636afa501a9d1500b4260c1267b5d22b662 files/digest-MailScanner-4.55.10.3 292 +SHA256 ebc3e865d5d86541baa6af896c20ae8b830fa5e09ce038e94fc9096352749188 files/digest-MailScanner-4.55.10.3 292 diff --git a/mail-filter/MailScanner/files/digest-MailScanner-4.55.10.3 b/mail-filter/MailScanner/files/digest-MailScanner-4.55.10.3 new file mode 100644 index 000000000..ec12c8f30 --- /dev/null +++ b/mail-filter/MailScanner/files/digest-MailScanner-4.55.10.3 @@ -0,0 +1,3 @@ +MD5 e461e100d07d6d0aadb570b0ec66dd0c MailScanner-install-4.55.10-3.tar.gz 7047731 +RMD160 e4ce718f90c869e5fbe02faf56da372255779ef2 MailScanner-install-4.55.10-3.tar.gz 7047731 +SHA256 1d638c903045834f6055ee376181f068d6eb006024202d786bfbb98ba4047b8d MailScanner-install-4.55.10-3.tar.gz 7047731 |