diff --git a/srcpkgs/nullmailer/INSTALL b/srcpkgs/nullmailer/INSTALL new file mode 100644 index 00000000000..d3eb6ccbec6 --- /dev/null +++ b/srcpkgs/nullmailer/INSTALL @@ -0,0 +1,16 @@ +# INSTALL +case "${ACTION}" in +post) + if [ "${UPDATE}" = "no" ]; then + mkfifo -m 600 var/spool/nullmailer/trigger + chown _nullmail var/spool/nullmailer/* + + for f in queue mailq; do + chown _nullmail usr/bin/nullmailer-$f + chmod u+s usr/bin/nullmailer-$f + done + + chown _nullmail:_nullmail etc/nullmailer/remotes + fi + ;; +esac diff --git a/srcpkgs/nullmailer/REMOVE b/srcpkgs/nullmailer/REMOVE new file mode 100644 index 00000000000..25432509e28 --- /dev/null +++ b/srcpkgs/nullmailer/REMOVE @@ -0,0 +1,8 @@ +# REMOVE +case "${ACTION}" in +pre) + if [ "${UPDATE}" = "no" ]; then + rm -f var/spool/nullmailer/trigger + fi + ;; +esac diff --git a/srcpkgs/nullmailer/files/nullmailer/run b/srcpkgs/nullmailer/files/nullmailer/run new file mode 100644 index 00000000000..2c3bc8aea0c --- /dev/null +++ b/srcpkgs/nullmailer/files/nullmailer/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u _nullmail nullmailer-send 2>&1 diff --git a/srcpkgs/nullmailer/template b/srcpkgs/nullmailer/template new file mode 100644 index 00000000000..16a0bc618ef --- /dev/null +++ b/srcpkgs/nullmailer/template @@ -0,0 +1,32 @@ +# Template file for 'nullmailer' +pkgname=nullmailer +version=2.2 +revision=1 +build_style=gnu-configure +configure_args="--enable-tls" +conf_files="/etc/nullmailer/*" +make_dirs=" + /var/spool/nullmailer/failed 0700 _nullmail root + /var/spool/nullmailer/queue 0700 _nullmail root + /var/spool/nullmailer/tmp 0700 _nullmail root" +makedepends="gnutls-devel" +short_desc="Simple relay-only mail transport agent" +maintainer="Deneys S. Maartens " +license="GPL-2.0-or-later" +homepage="https://untroubled.org/nullmailer/" +distfiles="https://untroubled.org/nullmailer/archive/nullmailer-${version}.tar.gz" +checksum=9886fa627b7e7e775e2f09fbe789247b1ca304f152da04ff705e50079263a855 +system_accounts="_nullmail" + +post_install() { + for f in mailq sendmail; do + mv ${DESTDIR}/usr/bin/{,nullmailer-}$f + ln -sf nullmailer-$f ${DESTDIR}/usr/bin/$f + done + + vinstall /dev/null 600 etc/nullmailer remotes + vsv nullmailer + + # fifos cause xbps-create (v0.53) to segfault + rm -vf ${DESTDIR}/var/spool/nullmailer/trigger +}