summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-05-30 21:58:13 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-05-30 21:58:13 -0700
commit64b8b23976b22d182a60cd231266d7396cf1f0ef (patch)
tree50f747a5d36e6a375d7dd2b3c6927a6b06bcf8a1 /net-mail
parentnet-mail/relay-ctrl: fix grsec RLIMIT_NOFILE overstep (diff)
downloadgentoo-64b8b23976b22d182a60cd231266d7396cf1f0ef.tar.gz
gentoo-64b8b23976b22d182a60cd231266d7396cf1f0ef.tar.bz2
gentoo-64b8b23976b22d182a60cd231266d7396cf1f0ef.zip
net-mail/relay-ctrl: bump
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'net-mail')
-rw-r--r--net-mail/relay-ctrl/Manifest1
-rw-r--r--net-mail/relay-ctrl/relay-ctrl-3.2.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/net-mail/relay-ctrl/Manifest b/net-mail/relay-ctrl/Manifest
index 7e7d32a63641..543676941f89 100644
--- a/net-mail/relay-ctrl/Manifest
+++ b/net-mail/relay-ctrl/Manifest
@@ -1 +1,2 @@
DIST relay-ctrl-3.1.1.tar.gz 35046 BLAKE2B 91e4ce0f1f6ce5933f64e0d60407004d409474180f42bf40632bdb3bce1f3f974abdb597d34ab7ee4113e041323bd55965ce57f271fe79cfb8c56972fe8612b4 SHA512 738a001f6a058809955f04664919f261ff1a0bfc280ec5e805b870baf448b27664e1b376dd078100a2847e38248eb16651e23812f00609a437893e7b1dc9102c
+DIST relay-ctrl-3.2.tar.gz 23119 BLAKE2B 663a95e7ef075b1b1fa390ab4d144a83c02eec615aa2a359892da1c5878ffe44995ed28df792a7cf1c179c93c1f874c87ffe4b781a28694c5fd81cec38228056 SHA512 aa2c7516e330ba3c4f466848e59b60cf5649393c3f9c87a3a5e5dfa170f96b9b1ad519098dfa153f9e06f9e02bd48d2a22118e1e8ccfe3e2585250e8feb4e5af
diff --git a/net-mail/relay-ctrl/relay-ctrl-3.2.ebuild b/net-mail/relay-ctrl/relay-ctrl-3.2.ebuild
new file mode 100644
index 000000000000..2c858db5f652
--- /dev/null
+++ b/net-mail/relay-ctrl/relay-ctrl-3.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs fixheadtails
+
+DESCRIPTION="SMTP Relaying Control designed for qmail & tcpserver"
+HOMEPAGE="http://untroubled.org/relay-ctrl/"
+SRC_URI="http://untroubled.org/relay-ctrl/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-libs/bglibs"
+RDEPEND="${DEPEND}
+ sys-apps/ucspi-tcp
+ virtual/daemontools"
+
+RELAYCTRL_BASE="/var/spool/relay-ctrl"
+# this is relative to RELAYCTRL_BASE
+RELAYCTRL_STORAGE="allow"
+RELAYCTRL_CONFDIR="/etc/relay-ctrl"
+RELAYCTRL_BINDIR="/usr/bin"
+
+src_prepare() {
+ eapply_user
+ ht_fix_file "${S}"/Makefile
+ #eapply "${FILESDIR}"/authenticated.c-relayfixup.diff # Fixed upstream in a different way
+ eapply "${FILESDIR}"/relay-ctrl-3.1.1-NOFILE-overstep.patch
+}
+
+src_configure() {
+ local myCC="$(tc-getCC)"
+ echo "${myCC} ${CFLAGS}" > conf-cc || die
+ echo "${myCC} ${LDFLAGS}" > conf-ld || die
+}
+
+src_install() {
+ exeinto ${RELAYCTRL_BINDIR}
+ doexe relay-ctrl-age relay-ctrl-allow relay-ctrl-check relay-ctrl-send relay-ctrl-udp relay-ctrl-chdir
+
+ #NB: at some point the man page for relay-ctrl-chdir will be added!
+ doman relay-ctrl-age.8 relay-ctrl-allow.8 relay-ctrl-check.8 relay-ctrl-send.8 relay-ctrl-udp.8
+ dodoc README ANNOUNCEMENT NEWS
+
+ keepdir ${RELAYCTRL_BASE} ${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE}
+ fperms 700 ${RELAYCTRL_BASE}
+ # perm 777 is intentional, see http://untroubled.org/relay-ctrl/
+ fperms 777 ${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE}
+
+ dodir ${RELAYCTRL_CONFDIR}
+
+ # tell it our storage dir
+ echo "${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE}" \
+ > ${D}${RELAYCTRL_CONFDIR}/RELAY_CTRL_DIR || die
+ # default to 30 minutes
+ echo "1800" > ${D}${RELAYCTRL_CONFDIR}/RELAY_CTRL_EXPIRY || die
+
+ dodir /etc/cron.hourly
+ echo "#!/bin/sh" > ${D}/etc/cron.hourly/relay-ctrl-age
+ echo "/usr/bin/envdir ${RELAYCTRL_CONFDIR} ${RELAYCTRL_BINDIR}/relay-ctrl-age" \
+ >> "${D}"/etc/cron.hourly/relay-ctrl-age
+ fperms 755 /etc/cron.hourly/relay-ctrl-age
+}
+
+pkg_postinst() {
+ if [[ -d /usr/lib/courier-imap/authlib ]]; then
+ ln -sf /usr/bin/relay-ctrl-allow \
+ /usr/lib/courier-imap/authlib/relay-ctrl-allow
+ fi
+ elog "Please see the instructions in /usr/share/doc/${PF}/README"
+ elog "for setup instructions with Courier-IMAP and Qmail"
+
+ einfo "Ensure that the relay-ctrl-age cronjob is running"
+ einfo "otherwise your system may accumulate old relay entries."
+}