mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/nullmailer: new aport
This commit is contained in:
parent
e42bc262b7
commit
619f77a4a7
55
testing/nullmailer/APKBUILD
Normal file
55
testing/nullmailer/APKBUILD
Normal file
@ -0,0 +1,55 @@
|
||||
# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
|
||||
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
|
||||
pkgname=nullmailer
|
||||
pkgver=2.2
|
||||
pkgrel=0
|
||||
pkgdesc="Simple relay-only mail transport agent"
|
||||
url="https://github.com/bruceg/nullmailer"
|
||||
arch="all"
|
||||
license="GPL-2.0-only"
|
||||
subpackages="$pkgname-doc $pkgname-openrc"
|
||||
makedepends="automake autoconf bash"
|
||||
checkdepends="daemontools ucspi-tcp6"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/bruceg/nullmailer/archive/$pkgver.tar.gz
|
||||
fix-tests-catch-port.patch
|
||||
|
||||
nullmailer.initd
|
||||
adminaddr.conf
|
||||
defaultdomain.conf
|
||||
remotes.conf
|
||||
"
|
||||
pkgusers="nullmailer"
|
||||
pkggroups="nullmailer"
|
||||
install="$pkgname.pre-install"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
ash ./autogen.sh
|
||||
}
|
||||
|
||||
build() {
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
make DESTDIR=$pkgdir install
|
||||
install -Dm0755 "$srcdir/nullmailer.initd" "$pkgdir/etc/init.d/nullmailer"
|
||||
install -Dm0644 "$srcdir/adminaddr.conf" "$pkgdir/etc/nullmailer/adminaddr"
|
||||
install -Dm0644 "$srcdir/defaultdomain.conf" "$pkgdir/etc/nullmailer/defaultdomain"
|
||||
install -Dm0644 "$srcdir/remotes.conf" "$pkgdir/etc/nullmailer/remotes"
|
||||
}
|
||||
|
||||
sha512sums="15c070edcf820ad13d8e0b250f73d75e45f592caa039e94fd717226fe09cd0ddc1f165388fab6234f57b340acc5127b54df14f35022858aab971b1f3d4e89e63 nullmailer-2.2.tar.gz
|
||||
499666333703d6b4dfe9afa76f1d4a48ec7faa4a2ca9dbe8aee6737ce98dcf4509b281ebe2fd2ce0b32d3a91b807a8b2dcffe794b70cb5b3ccb10cb7eca713e4 fix-tests-catch-port.patch
|
||||
e183bf83055ea0d9fd63598329296d9f654f99bea8761b4f9a5961a76b26ae62e4a8a4b92007e12ecd56e8416a3bac87aaff16d575c7079d6ac571e3b8f80595 nullmailer.initd
|
||||
93eac7b9fde3c7a2ffe3acdba1dcfccc1e40d94eb9fc7fc6722d3dfaaa3fd4378bf33698ebc0e10e108833251dbfa35fd280d62d865145fe415c431120b11ffe adminaddr.conf
|
||||
0d3df6c4d710b8e91d40649ca991e7ab424be625cae724f8305d1ed4f2cf8a1b08e07030ee690cea7091a4c0320aae4e2df14e19efbcc54f1875338d883d8809 defaultdomain.conf
|
||||
9858c4c52057b222c4f4219301adcc8b36e6c7e4ed51af51f887141fba7a639ed52b756eec06776c91f91767006c4592bca0158708acc371a9123d2efd9b6004 remotes.conf"
|
||||
2
testing/nullmailer/adminaddr.conf
Normal file
2
testing/nullmailer/adminaddr.conf
Normal file
@ -0,0 +1,2 @@
|
||||
# contains the target email address to send emails
|
||||
#target-email-address@your-domain.net
|
||||
2
testing/nullmailer/defaultdomain.conf
Normal file
2
testing/nullmailer/defaultdomain.conf
Normal file
@ -0,0 +1,2 @@
|
||||
# marks the domain the emails are sent from
|
||||
#example.com
|
||||
28
testing/nullmailer/fix-tests-catch-port.patch
Normal file
28
testing/nullmailer/fix-tests-catch-port.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From: Simon Frankenberger <simon-alpine@fraho.eu>
|
||||
Date: Wed, 16 Sep 2020 09:46:13 +0200
|
||||
Subject: fix port detection from tcpserver in tests
|
||||
|
||||
It seems that the port printed out by tcpserver differs from
|
||||
the expected form. Use some bash magic to extract the port number
|
||||
from the logline (last element in last line, separated by space).
|
||||
|
||||
--- old/test/functions.in
|
||||
+++ new/test/functions.in
|
||||
@@ -52,6 +52,7 @@
|
||||
catch-port() {
|
||||
local name=$1
|
||||
port=$( head -n 1 $tmpdir/service/${name}-log )
|
||||
+ port=${port##* }
|
||||
}
|
||||
|
||||
#not() { if "$@"; then return 1; else return 0; fi }
|
||||
--- old/test/tests/protocols
|
||||
+++ new/test/tests/protocols
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
start server tcpserver -1 0 0 date
|
||||
port=$( head -n 1 $tmpdir/service/server-log )
|
||||
+ port=${port##* }
|
||||
echo "Testing protocol failure with $p."
|
||||
error 11 protocol $p -p $port --host=localhost 3<$testmail
|
||||
stop server
|
||||
11
testing/nullmailer/nullmailer.initd
Normal file
11
testing/nullmailer/nullmailer.initd
Normal file
@ -0,0 +1,11 @@
|
||||
#!/sbin/openrc-run
|
||||
supervisor=supervise-daemon
|
||||
|
||||
name=nullmailer
|
||||
description="Nullmailer relay-only MTA"
|
||||
|
||||
command=/usr/sbin/nullmailer-send
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
6
testing/nullmailer/nullmailer.pre-install
Executable file
6
testing/nullmailer/nullmailer.pre-install
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S nullmailer 2>/dev/null
|
||||
adduser -SD -h /var/spool/nullmailer -G nullmailer nullmailer 2>/dev/null
|
||||
|
||||
exit 0
|
||||
3
testing/nullmailer/remotes.conf
Normal file
3
testing/nullmailer/remotes.conf
Normal file
@ -0,0 +1,3 @@
|
||||
# contains the email login configuration on the remote system
|
||||
#127.0.0.1 smtp
|
||||
#smtp.gmail.com smtp --auth-login --port=587 --starttls --user=your-name@gmail.com --pass=your-password --starttls
|
||||
Loading…
x
Reference in New Issue
Block a user