summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2014-02-15 13:16:26 +0000
committerPacho Ramos <pacho@gentoo.org>2014-02-15 13:16:26 +0000
commitffb3a37d8e7e4bb52c8cb3fa918c0fdf6a63dea3 (patch)
treeb964af5ea275c0d0626f3b6d36917ec340e9dd8f /mail-filter/amavisd-new
parentAdd unit file (#500500) (diff)
downloadhistorical-ffb3a37d8e7e4bb52c8cb3fa918c0fdf6a63dea3.tar.gz
historical-ffb3a37d8e7e4bb52c8cb3fa918c0fdf6a63dea3.tar.bz2
historical-ffb3a37d8e7e4bb52c8cb3fa918c0fdf6a63dea3.zip
Add unit file (#497756 by David Heidelberger (okias))
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64 Manifest-Sign-Key: 0xA188FBD4
Diffstat (limited to 'mail-filter/amavisd-new')
-rw-r--r--mail-filter/amavisd-new/ChangeLog10
-rw-r--r--mail-filter/amavisd-new/Manifest22
-rw-r--r--mail-filter/amavisd-new/amavisd-new-2.8.1-r1.ebuild188
-rw-r--r--mail-filter/amavisd-new/files/amavisd.service13
4 files changed, 216 insertions, 17 deletions
diff --git a/mail-filter/amavisd-new/ChangeLog b/mail-filter/amavisd-new/ChangeLog
index 8c683d2619e2..02bb5d25f1d2 100644
--- a/mail-filter/amavisd-new/ChangeLog
+++ b/mail-filter/amavisd-new/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for mail-filter/amavisd-new
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v 1.199 2013/07/04 10:32:11 eras Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v 1.200 2014/02/15 13:16:21 pacho Exp $
+
+*amavisd-new-2.8.1-r1 (15 Feb 2014)
+
+ 15 Feb 2014; Pacho Ramos <pacho@gentoo.org> +amavisd-new-2.8.1-r1.ebuild,
+ +files/amavisd.service:
+ Add unit file (#497756 by David Heidelberger (okias))
*amavisd-new-2.8.1 (04 Jul 2013)
diff --git a/mail-filter/amavisd-new/Manifest b/mail-filter/amavisd-new/Manifest
index d643a201420d..53a08bdbd410 100644
--- a/mail-filter/amavisd-new/Manifest
+++ b/mail-filter/amavisd-new/Manifest
@@ -4,28 +4,20 @@ Hash: SHA256
AUX amavis-mc.initd 546 SHA256 083abfb37dbdad32b9d75b2667701cde291f3c8793e0bd829910d334eddaed63 SHA512 389f09e092d71efdbd06617947b4ab002714fb2a1471573dccf2ab35490f81648d8f28471c48254aba076b538a63253e090e19128bd7117c7119359a120a95f6 WHIRLPOOL 9bbec76cb41ecc657b22d1441a052908cbfa454cd33a5e9c1c192339b1745da917db59e9926aab6f1dea0c2597d39677d7b8ea2be12edb2e6cf6878654ea9018
AUX amavisd.initd 832 SHA256 b1d40ea4a25cf6f03ccd1b5f02adbfd2203944944077e2906b978e48ff6fd80b SHA512 f6aeb51fff579f233a387b43f2bb1f9396ba7d2d3bb058d74cca5aa22b5b8914e30bd1f95a674bafdc81c191bbff5077d7a6682894e6f9f57c99d81006920138 WHIRLPOOL 8f4e863fe2eb4f5c44b202f2c500713273de6d43ec410d953e18f45b12956c2b67775daf79a0c6830405ab857feaa652722c63783e0b5a3a0adc9b67fd1b2578
AUX amavisd.initd-r1 828 SHA256 0176e34bbc0261bd3c50ae99174af623fe1aa8e8413c3f6196958c02c37d9f1e SHA512 c9fa8c967026a29e486ffb79a10578efa28ba868985a0e83f88ab04987bc0a80a17613e9c92a3c7e03676ab2ee27f07e79cf7b21069161f73c6e517226b7e40f WHIRLPOOL 48958a935e3a79ab44315969b69ff7223241a60a52b14bbbc64daf2363dfb259da8a141c5617f13f7fca6bce2a0b636ac36a4f503f384bdbc5d2c5bc04332306
+AUX amavisd.service 290 SHA256 4e99da77c6d466d03e149470168f1674d3b81c6c0aceb1c22954c8acd5542502 SHA512 2b67bece7706d1f18892cfb142970c7068dfe9c81eee546038ef27561619ad9633f593a98f6afb5f070cd608d6f7c9e7130a5d7e815c050f00d2e6cee220c6d3 WHIRLPOOL d825144145b049575f47216b76e5b42458663a9f8db79c930d2014bb2c0162719cb4bc85f15863243c318e11bf40dd75a09334c774ba613016e53b8802d2ea27
DIST amavisd-new-2.7.2.tar.gz 945448 SHA256 4665e0fb9a71f483f1123113a006291e37f744a5880f945ccf9fd34d51cb9275 SHA512 f707a5ac9d6acee2f9d144fda86fed92bbf33693858262ab0a95663da50f78a023102d9d50dd5a6a256ef6302a241f9c28d2b190e3efe2110c0eea15557ae756 WHIRLPOOL c0422d80b9dc11a7a2e9cb10092b7c97c02536aa852f70c566ab6e2e6a865b901ad24caf626b8b02ee64979bced7c25f03888827fd47ffbc4e733bb733e08c9e
DIST amavisd-new-2.8.0.tar.xz 716556 SHA256 c21df73b4ba12322b67779fa5f6f23f57757240568f57d81e94702f0f7c1ce8c SHA512 4c927a6956027d8c953b455d37c0c152950ad392c50de992ecbd1f3525d13c11bc29b845496a2a51713fafbf62b6d589435d385b3bccaa34829049890cf56635 WHIRLPOOL c82d58a4d4337b3b42dcdd2e8b80060bdf288db51bdb5e69a8a1351733b4661d79a52d257f18cd26cf9a334f1195db0d8d9a0e3bf28a1043a49e5946817fba62
DIST amavisd-new-2.8.1.tar.xz 731816 SHA256 6e333a70adbd24ec52202700059fbf133e20b3c3bf5ec6f4bb10f9a2f25ea82e SHA512 a840b57513b8a7b18e15085016c273ba2fba5cceb76ef52c52aa2ca34e9257be78f8bb8ea350dbdac3b26d2aba8f5aae821c1c45f2d37bc6be04ff2efb9f3ade WHIRLPOOL 0d0ce9a1e8adae101d0aace45251c02118c8f4481e67ab1af7fb32843010ac9e0b9f8ab88f0769a27c1e74e297507efe53c3a6e8ce84c616e1beeaf281027044
EBUILD amavisd-new-2.7.2.ebuild 4291 SHA256 3b9f9cae6315d49734d83299524da54af123d0f72f28ba97a34937a3e314eaaa SHA512 d9ab58dec4466f5a56f0c93a5c88e574f45cef76cc632ef5415ad9c378a6233c17f09750b2d704cb394c15872fcee5d9707e6fd343e082522eb28b5e81808ae7 WHIRLPOOL 8e76512b761b193af2010739907977de0a14ca3970f94609e2c0d3014ce741738144fd15973f95b2174963ac942419cde8b40134ffb1e6b29f095b8ea1bc2fb0
EBUILD amavisd-new-2.8.0.ebuild 4629 SHA256 91f887a7a36852d866838bd09470936eea12196b74250e019cb0e3d57faa3064 SHA512 f5a452ec287c61e82b17d545eea6bfee9c9e862de3cf6aae47a2115b23e2b70707bf9f2085e798ab88ec55283ce111b811c122437513a3ace8905b4b81926867 WHIRLPOOL 6e57103138d4c61996b6e9c13b4fba98989c061d03246611876378b789dac40b20d55a9058a01ee190087c7c74d087c97357e1c44cbdf8622413c7f233d4b801
+EBUILD amavisd-new-2.8.1-r1.ebuild 4872 SHA256 1d83d7b6d8e9215136708d0aefafdcd2220b0ef57f8830f26480c9ca84660ab8 SHA512 64a35752175a27385a9b2e9fe0dacc30e5dcf90d45fdcd6e27bcc826a2037d507cd36c9cc755a19ade22dceaa7bcde65e0426a4d431465bc08a04f959f9b7caf WHIRLPOOL 53878672296d17b8d0d8f9cd83f50b92d2063dcce1938477dfcb8f9282a4837ab1ad8eec3ab5d5adc686d079e6a828e846a32f958399a130b040748b2fcb176c
EBUILD amavisd-new-2.8.1.ebuild 4630 SHA256 677ace999088447813b9ea475a7e2007cf1890250838f6e691520fee0976375b SHA512 cc14ba78ccb66e4c1e845ab97bdb1f8e247bb17fb12f36dd689ba904ea8efb2fdcf01961a804570a4c9f3a35b87d23de2f430dcfaa44308b521d1671c25b7792 WHIRLPOOL 554e629dc5eab9eca243ccd7fd4ff125eba786c3fe0684bca8dddb8ac7adb4ddd00cc2209bd3548be8e9cec62fc8371abc1e747ecaa9ca4392de4432423b6208
-MISC ChangeLog 36985 SHA256 5e730d193e74f3b782589086795dae19b7fde31801631235c8838bd98142117f SHA512 1549f00785354f7c4418c906f0aee78ba96a185c3cba9cfd36fe8e16f4d9b13d9ddbb6de58091b23b61ee56ee032b1b833732fe47cf7a44553f9c6e346e5b6c4 WHIRLPOOL c7e5b887cbbcd5b4b3b82bf557b7285f89fa8507580aa0892e671347d6c1c8c64d7ff42408858d3c1cf946f966be931aeb4cc0be135ae8e4b9552573438d81ad
+MISC ChangeLog 37182 SHA256 7c53747cf45c75da748fcc6a26d71b722ef8ecdbe1f69c318cc143433941e2d3 SHA512 542d5dc68ed72455548b53e1f33e5ece82edfca61493084a974f612e613acf1223e641bd7c328c32b0daac63011b18876c6b361c568998eea99d6e0ac65303ba WHIRLPOOL e620d486237c9c9250d3eb94fcd6e18bd7d12b3adee9011a07fbb3206077618916676299daa43763bac09e0f4aeb45d7509b51f4faa1da235c9182aec409b82e
MISC metadata.xml 558 SHA256 d35f31e5c8a6d678fedb999a042c59eaa48a806558cf4e18f0f359ee64f7167b SHA512 af4c3ab95878fd14ad870c4364b3e4c03b863b2501ab2d899c4d6a8bc58e3d3d488f4fcba685939242d3690f490b9113af3675fdd14159eed8d8c873dd6f516c WHIRLPOOL a1dc324646fe6226f635030f825c25ed6e39cdc0a2c51f1a729f9225ff5e234d6c3f0ea297427d00a9ce3e5bbb64b8cac64fc49db78306bb0e5c077b9f1a437c
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.20 (GNU/Linux)
+Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJR1U8rAAoJEHfx8XVYajsf83QP/3N34IquX89/pWpQzOGx4qfE
-zySY2X7yZsrg4HohcEVPvY/95z1URmDXkC3lfzMjoCQZMupO5dlDa8d0Wu/YY8ox
-AjzACTAP7lEgvqBvk0zflSOJmhpYLvm7fP74ae10iUEu6kbLPoEMlQsvDAWlv862
-YthcHL24BDmzMwsn74s6gfZlkckM12bho+FDWd42NWD6cFRrkCEPRq7cgD2ruATh
-q9OB8zt0+GXYNuKuRMtPupgWaz08a/IvWMbxomC09zjau8qNteKVHpwJKh3jZ6eZ
-YswTvJu2X2hf837oxolzfiBXxNZeag+9hsKcxermRJ9sVJY3qzjqk8bVTgDdZkMx
-g3m6LNODzMXPpOkJMe6Dh/8FYpdsFurpm9QpGkhWF/n/Bn2pXri8Uw++dXl4zMhK
-Hdj+pJ+s5wt1+1c8PeIV/Ff9IFRR9KpZ1TvL96MQmwXNBDUZrGfG1DCiz7VzGfV4
-4PhubB7Hko6vqIcnODFogjsdjBXIwLDqOi/krOTlPU4q1he56K5d4nd82AB4PYvT
-wEL5m3AApxclo7jE5Ga8vI3CtjGmyYJqRlxmfExc4PUmPKL1F+g+gpDsihcrdgxB
-AmKWzyruK5+MG1jIS74miMqZXMfgTyvAuQvbJeCoCMC4IOb62z4aMMDVz+ZICyD/
-PRzyVfjJWErZ9JJb2umI
-=sFDu
+iEYEAREIAAYFAlL/aKYACgkQCaWpQKGI+9QSnACfTjYsx8fS1dHrQwUpGtF2at5o
+qSoAn28p3ZHs96TDU45e70T9c0Wl1akW
+=LtCC
-----END PGP SIGNATURE-----
diff --git a/mail-filter/amavisd-new/amavisd-new-2.8.1-r1.ebuild b/mail-filter/amavisd-new/amavisd-new-2.8.1-r1.ebuild
new file mode 100644
index 000000000000..33d6111608d8
--- /dev/null
+++ b/mail-filter/amavisd-new/amavisd-new-2.8.1-r1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/amavisd-new-2.8.1-r1.ebuild,v 1.1 2014/02/15 13:16:21 pacho Exp $
+
+EAPI=4
+inherit eutils systemd user
+
+MY_P="${P/_/-}"
+DESCRIPTION="High-performance interface between the MTA and content checkers."
+HOMEPAGE="http://www.ijs.si/software/amavisd/"
+SRC_URI="http://www.ijs.si/software/amavisd/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="courier dkim ldap mysql postgres qmail razor snmp spamassassin zmq"
+
+DEPEND=">=sys-apps/sed-4
+ >=dev-lang/perl-5.8.2"
+
+RDEPEND="${DEPEND}
+ >=sys-apps/coreutils-5.0-r3
+ app-arch/cpio
+ app-arch/gzip
+ app-arch/bzip2
+ app-arch/arc
+ app-arch/cabextract
+ app-arch/freeze
+ app-arch/lha
+ app-arch/lrzip
+ app-arch/lzop
+ app-arch/ncompress
+ app-arch/p7zip
+ app-arch/pax
+ app-arch/unarj
+ app-arch/unrar
+ app-arch/xz-utils
+ app-arch/zoo
+ net-mail/ripole
+ >=dev-perl/Archive-Zip-1.14
+ >=virtual/perl-IO-Compress-1.35
+ >=virtual/perl-Compress-Raw-Zlib-2.017
+ dev-perl/Convert-TNEF
+ >=dev-perl/Convert-UUlib-1.08
+ virtual/perl-MIME-Base64
+ >=dev-perl/MIME-tools-5.415
+ >=dev-perl/MailTools-1.58
+ >=dev-perl/net-server-0.91
+ virtual/perl-Digest-MD5
+ dev-perl/IO-stringy
+ dev-perl/IO-Socket-IP
+ >=virtual/perl-Time-HiRes-1.49
+ dev-perl/Unix-Syslog
+ sys-apps/file
+ >=sys-libs/db-4.4.20
+ dev-perl/BerkeleyDB
+ dev-perl/Convert-BinHex
+ >=dev-perl/Mail-DKIM-0.31
+ virtual/mta
+ ldap? ( >=dev-perl/perl-ldap-0.33 )
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ razor? ( mail-filter/razor )
+ snmp? ( net-analyzer/net-snmp[perl] )
+ spamassassin? ( mail-filter/spamassassin )
+ zmq? ( dev-perl/ZMQ-LibZMQ2 )"
+
+AMAVIS_ROOT="/var/amavis"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ if use courier ; then
+ epatch amavisd-new-courier.patch
+ fi
+
+ if use qmail ; then
+ epatch amavisd-new-qmqpqq.patch
+ fi
+
+ sed -i \
+ -e '/daemon/s/vscan/amavis/' \
+ -e "s:'/var/virusmails':\"\$MYHOME/quarantine\":" \
+ "${S}/amavisd.conf" "${S}/amavis-mc" || die
+
+ if ! use dkim ; then
+ sed -i -e '/enable_dkim/s/1/0/' "${S}/amavisd.conf" \
+ || die "missing conf file"
+ fi
+
+ if use zmq ; then
+ sed -i -e '/enable_zmq/s/# //' "${S}/amavisd.conf"
+ fi
+}
+
+src_install() {
+ dosbin amavisd amavisd-agent amavisd-nanny amavisd-release \
+ amavisd-signer amavisd-status
+ dobin p0f-analyzer.pl amavisd-submit
+
+ if use snmp ; then
+ dosbin amavisd-snmp-subagent
+ use zmq && dosbin amavisd-snmp-subagent-zmq
+ dodoc AMAVIS-MIB.txt
+ fi
+
+ if use zmq ; then
+ dosbin amavis-services amavis-mc
+ newinitd "${FILESDIR}"/amavis-mc.initd amavis-mc
+ fi
+
+ insinto /etc
+ insopts -m0640
+ doins amavisd.conf
+
+ newinitd "${FILESDIR}/amavisd.initd-r1" amavisd
+
+ systemd_dounit "${FILESDIR}/amavisd.service"
+ use clamd || sed -i -e '/Wants=clamd/d' "${ED}"/usr/lib/systemd/system/amavisd.service
+ use spamassasin || sed -i -e '/Wants=clamd/d' "${ED}"/usr/lib/systemd/system/amavisd.service
+
+ keepdir "${AMAVIS_ROOT}"
+ keepdir "${AMAVIS_ROOT}/db"
+ keepdir "${AMAVIS_ROOT}/quarantine"
+ keepdir "${AMAVIS_ROOT}/tmp"
+ keepdir "${AMAVIS_ROOT}/var"
+
+ dodoc AAAREADME.first INSTALL MANIFEST RELEASE_NOTES TODO \
+ amavisd.conf-default amavisd-custom.conf
+
+ docinto README_FILES
+ dodoc README_FILES/README*
+ dohtml README_FILES/*.{html,css}
+ docinto README_FILES/images
+ dodoc README_FILES/images/*.png
+ docinto README_FILES/images/callouts
+ dodoc README_FILES/images/callouts/*.png
+
+ docinto test-messages
+ dodoc test-messages/README
+ dodoc test-messages/sample.tar.gz.compl
+
+ #for i in whitelist blacklist spam_lovers; do
+ # if [ -f ${AMAVIS_ROOT}/${i} ]; then
+ # cp "${AMAVIS_ROOT}/${i}" "${D}/${AMAVIS_ROOT}"
+ # else
+ # touch "${D}"/${AMAVIS_ROOT}/${i}
+ # fi
+ #done
+
+ if use ldap ; then
+ dodir /etc/openldap/schema
+ insinto /etc/openldap/schema
+ insopts -o root -g root -m 644
+ newins LDAP.schema ${PN}.schema || die
+ fi
+}
+
+pkg_preinst() {
+ enewgroup amavis
+ enewuser amavis -1 -1 "${AMAVIS_ROOT}" amavis
+ if use razor ; then
+ if [ ! -d "${ROOT}${AMAVIS_ROOT}/.razor" ] ; then
+ elog "Setting up initial razor config files..."
+
+ razor-admin -create -home="${D}/${AMAVIS_ROOT}/.razor"
+ sed -i -e "s:debuglevel\([ ]*\)= .:debuglevel\1= 0:g" \
+ "${D}/${AMAVIS_ROOT}/.razor/razor-agent.conf"
+ fi
+ fi
+
+ if ! use spamassassin ; then
+ elog "Disabling anti-spam code in amavisd.conf..."
+ sed -i -e \
+ "/^#[[:space:]]*@bypass_spam_checks_maps[[:space:]]*=[[:space:]]*(1)/s/^#//" \
+ "${D}/etc/amavisd.conf"
+ fi
+
+ if has_version "<${CATEGORY}/${PN}-2.7.0" ; then
+ elog "Amavisd-new ships with a short and condensed config file now."
+ elog "Transferring your current settings to the new format is"
+ elog "recommended for ease of future upgrades."
+ fi
+}
+
+pkg_postinst() {
+ chown root:amavis "${ROOT}/etc/amavisd.conf"
+ chown -R amavis:amavis "${ROOT}/${AMAVIS_ROOT}"
+}
diff --git a/mail-filter/amavisd-new/files/amavisd.service b/mail-filter/amavisd-new/files/amavisd.service
new file mode 100644
index 000000000000..2a56e443eedd
--- /dev/null
+++ b/mail-filter/amavisd-new/files/amavisd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Amavisd Daemon
+Wants=postfix.service
+Wants=spamassassin.service
+Wants=clamd.service
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/amavisd -c /etc/amavisd.conf foreground
+ExecReload=/usr/sbin/amavisd -c /etc/amavisd.conf reload
+
+[Install]
+WantedBy=multi-user.target