summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Hiscocks2015-09-12 17:40:24 +0100
committerSteven Hiscocks2015-09-12 17:40:24 +0100
commitb9fc7860d7a4c65d1e884ea2960766d1307bdcb9 (patch)
treecdb3da4b6c38f7efc3d3b60200f399c07233f767
downloadaur-b9fc7860d7a4c65d1e884ea2960766d1307bdcb9.tar.gz
Initial creation
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD32
-rw-r--r--milter-greylist.install14
-rw-r--r--milter-greylist.service12
4 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d367e497372
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = milter-greylist
+ pkgdesc = milter-greylist is a stand-alone milter written in C that implements the greylist filtering method.
+ pkgver = 4.5.14
+ pkgrel = 1
+ url = http://hcpnet.free.fr/milter-greylist/
+ install = milter-greylist.install
+ arch = x86_64
+ arch = i686
+ license = BSD
+ makedepends = libmilter
+ depends = libspf2
+ depends = opendkim
+ backup = etc/mail/greylist.conf
+ source = ftp://ftp.espci.fr/pub/milter-greylist/milter-greylist-4.5.14.tgz
+ source = milter-greylist.service
+ md5sums = 1e12295825afaa5e838be70b1f9af195
+ md5sums = SKIP
+
+pkgname = milter-greylist
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d3192504d9c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Steven Hiscocks <steven[at]hiscocks[dot]me[dot]uk>
+pkgname=milter-greylist
+pkgver=4.5.14
+pkgrel=1
+pkgdesc="milter-greylist is a stand-alone milter written in C that implements the greylist filtering method."
+url="http://hcpnet.free.fr/milter-greylist/"
+arch=('x86_64' 'i686')
+license=('BSD')
+depends=('libspf2' 'opendkim')
+makedepends=('libmilter')
+backup=('etc/mail/greylist.conf')
+install="${pkgname}.install"
+source=("ftp://ftp.espci.fr/pub/${pkgname}/${pkgname}-${pkgver}.tgz"
+ "${pkgname}.service")
+md5sums=('1e12295825afaa5e838be70b1f9af195'
+ 'SKIP')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-libspf2=/usr --with-libopendkim=/usr --enable-postfix
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -m0644 greylist2.conf "${pkgdir}/etc/mail/greylist.conf"
+
+ install -Dm0644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/milter-greylist.install b/milter-greylist.install
new file mode 100644
index 00000000000..629bd9ba393
--- /dev/null
+++ b/milter-greylist.install
@@ -0,0 +1,14 @@
+setup_user() {
+ getent group milt-gl &>/dev/null || groupadd -r milt-gl >/dev/null
+ getent passwd milt-gl &>/dev/null || useradd -r -d /var/lib/milter-greylist -g milt-gl -s /sbin/nologin milt-gl >/dev/null
+
+ if [[ -d /var/lib/milter-greylist ]]; then
+ chown milt-gl:milt-gl /var/lib/milter-greylist
+ fi
+
+ true
+}
+
+post_install() {
+ setup_user
+}
diff --git a/milter-greylist.service b/milter-greylist.service
new file mode 100644
index 00000000000..2738e0f3332
--- /dev/null
+++ b/milter-greylist.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Greylist milter
+Before=postfix.service
+After=network.target
+
+[Service]
+UMask=0007
+Environment=SOCKET=/var/lib/milter-greylist/greylist.sock
+ExecStart=/usr/bin/milter-greylist -D -d /var/lib/milter-greylist/greylist.db -f /etc/mail/greylist.conf -u milt-gl:milt-gl -p $SOCKET
+
+[Install]
+WantedBy=multi-user.target