summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2017-01-25 20:52:14 +0100
committerDirkjan Ochtman <djc@gentoo.org>2017-01-25 20:52:31 +0100
commitc7f2ff7d085aea57c4adfda6bdebdc0a55dfe172 (patch)
tree56fa8a5b448a4707359accda3fb1a8b3442cf125 /mail-filter
parentmedia-libs/mesa: Restore removal of vulkan headers. (diff)
downloadgentoo-c7f2ff7d085aea57c4adfda6bdebdc0a55dfe172.tar.gz
gentoo-c7f2ff7d085aea57c4adfda6bdebdc0a55dfe172.tar.bz2
gentoo-c7f2ff7d085aea57c4adfda6bdebdc0a55dfe172.zip
mail-filters/rmilter: start before mta (fixes bug 605592)
Package-Manager: portage-2.3.0
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/rmilter/files/rmilter.initd-r226
-rw-r--r--mail-filter/rmilter/rmilter-1.10.0-r2.ebuild46
2 files changed, 72 insertions, 0 deletions
diff --git a/mail-filter/rmilter/files/rmilter.initd-r2 b/mail-filter/rmilter/files/rmilter.initd-r2
new file mode 100644
index 00000000000..08b4c642d7a
--- /dev/null
+++ b/mail-filter/rmilter/files/rmilter.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 2015-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+RUNDIR=/var/run/rmilter
+PIDFILE=$RUNDIR/rmilter.pid
+
+depend() {
+ need net
+ before mta
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ checkpath -d $RUNDIR -m2750 -o rmilter:rmilter
+ rm -f $RUNDIR/$SVCNAME.sock
+ start-stop-daemon --start --quiet --pidfile $PIDFILE -u rmilter \
+ --exec /usr/sbin/rmilter -- -c /etc/rmilter/rmilter.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $?
+}
diff --git a/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild b/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild
new file mode 100644
index 00000000000..1844db6aa7c
--- /dev/null
+++ b/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils user
+
+DESCRIPTION="Another sendmail milter for different mail checks"
+SRC_URI="https://github.com/vstakhov/rmilter/archive/${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/vstakhov/rmilter"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dkim libressl +memcached"
+
+RDEPEND="dev-libs/libpcre
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ mail-filter/libmilter
+ >=dev-libs/glib-2.28
+ dkim? ( mail-filter/opendkim )
+ memcached? ( dev-libs/libmemcached )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup rmilter
+ enewuser rmilter -1 -1 /var/run/rmilter rmilter
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DKIM=$(usex dkim ON OFF)
+ -DENABLE_MEMCACHED=$(usex memcached ON OFF)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}/rmilter.initd-r2" rmilter
+ insinto /etc/rmilter
+ newins rmilter.conf.sample rmilter.conf.sample
+ newins rmilter-grey.conf rmilter-grey.conf
+}