Date: Tuesday, January 14, 2014 @ 15:53:34 Author: flexiondotorg Revision: 103996
Added nullmailer. Added: nullmailer/ nullmailer/repos/ nullmailer/trunk/ nullmailer/trunk/PKGBUILD nullmailer/trunk/nullmailer.install nullmailer/trunk/nullmailer.service --------------------+ PKGBUILD | 40 ++++++++++++++++++++++++++++++++++++++++ nullmailer.install | 44 ++++++++++++++++++++++++++++++++++++++++++++ nullmailer.service | 13 +++++++++++++ 3 files changed, 97 insertions(+) Added: nullmailer/trunk/PKGBUILD =================================================================== --- nullmailer/trunk/PKGBUILD (rev 0) +++ nullmailer/trunk/PKGBUILD 2014-01-14 14:53:34 UTC (rev 103996) @@ -0,0 +1,40 @@ +# $Id$ +# Maintainer : Martin Wimpress <c...@flexion.org> +# Contributor: Roberto Alsina <ralsina at kde.org> +# Contributor: Kurt J. Bosch <kjb-temp-2009 at alpenjodel.de> + +pkgname=nullmailer +pkgver=1.13 +pkgrel=3 +pkgdesc="Simple relay-only mail transport agent." +arch=('i686' 'x86_64') +url="http://www.untroubled.org/nullmailer/" +license=("GPL") +provides=('smtp-forwarder') +conflicts=('smtp-forwarder' 'smtp-server') +depends=('gnutls') +install=nullmailer.install +source=("http://www.untroubled.org/nullmailer/archive/${pkgname}-${pkgver}.tar.gz" + nullmailer.service) +md5sums=('aaeb8746fbc082917b26d0827ccc9270' + '300f17c52422d4156583f207f2405930') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/${pkgname} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --sbindir=/usr/bin \ + --enable-tls + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m 0644 ../nullmailer.service "${pkgdir}/usr/lib/systemd/system/nullmailer.service" + # Remove pipe and create on install to work around makepkg hang on grep -R + rm -f "${pkgdir}/var/nullmailer/trigger" +} Property changes on: nullmailer/trunk/PKGBUILD ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: nullmailer/trunk/nullmailer.install =================================================================== --- nullmailer/trunk/nullmailer.install (rev 0) +++ nullmailer/trunk/nullmailer.install 2014-01-14 14:53:34 UTC (rev 103996) @@ -0,0 +1,44 @@ +# arg 1: the new package version +post_install() { + if ! getent passwd nullmail > /dev/null; then + echo "==> Creating nullmail user" + usr/bin/useradd --comment "nullmailer MTA" --shell /bin/sh --home /var/nullmailer --system --user-group nullmail + fi + + echo "==> Creating trigger fifo" + rm -f var/nullmailer/trigger && mkfifo -m 600 var/nullmailer/trigger + + echo "==> Fixing permissions" + chown nullmail var/nullmailer/* + chown nullmail usr/bin/nullmailer-queue + chmod u+s usr/bin/nullmailer-queue + chown nullmail usr/bin/mailq + chmod u+s usr/bin/mailq + if ! [ -s etc/nullmailer/me ]; then + echo "==> Configuring" + hostnamectl --static > etc/nullmailer/me + fi + if ! [ -s etc/nullmailer/remotes ]; then + echo "smarthost.example.org smtp --port=25 --auth-login --user=user --pass=pass" > etc/nullmailer/remotes + chgrp nullmail etc/nullmailer/remotes + chmod 640 etc/nullmailer/remotes + fi +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install $1 +} + +# arg 1: the old package version +pre_remove() { + systemctl stop nullmailer + # Leave the 'queue' directory intact + rm -rf var/service/nullmailer/{tmp,trigger} + echo "==> Removing nullmailer user and group" + userdel nullmail + if getent group nullmail > /dev/null; then + groupdel nullmail + fi +} Added: nullmailer/trunk/nullmailer.service =================================================================== --- nullmailer/trunk/nullmailer.service (rev 0) +++ nullmailer/trunk/nullmailer.service 2014-01-14 14:53:34 UTC (rev 103996) @@ -0,0 +1,13 @@ +[Unit] +Description=Nullmailer relay-only MTA +After=local-fs.target +ConditionPathExists=/var/nullmailer/queue + +[Install] +WantedBy=multi-user.target + +[Service] +WorkingDirectory=/var/nullmailer +ExecStart=/usr/bin/nullmailer-send +User=nullmail +Restart=always