Fix opendkim

This commit is contained in:
Alex D. 2021-02-08 12:11:55 +00:00
parent c9d98f68dd
commit bbcecab870
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
4 changed files with 15 additions and 14 deletions

View File

@ -5,8 +5,8 @@ _svcname=opendkim
. ../APKBUILD-config.common
pkgver="2021.02.08"
pkgrel=0
depends="redxen-secret-opendkim~$pkgver"
pkgrel=3
depends="opendkim redxen-secret-opendkim~$pkgver"
makedepends="opendkim-utils"
source="
trusted_hosts
@ -14,12 +14,13 @@ source="
"
build() {
echo "*@redxen.eu $pkgver-mail._domainkey.redxen.eu" > signing_table
echo "$pkgver-mail._domainkey.redxen.eu redxen.eu:mail:/etc/opendkim/redxen/$pkgver-mail.private" > key_table
_selector="$pkgver-mail"
echo "*@redxen.eu $_selector._domainkey.redxen.eu" > signing_table
echo "$_selector._domainkey.redxen.eu redxen.eu:$_selector:/etc/opendkim/redxen/$_selector.private" > key_table
}
package() {
_files="$source signing_table"
_files="$source signing_table key_table"
for i in $_files; do
install -Dm444 "$i" "$pkgdir"/etc/opendkim/redxen/"$i"
done

View File

@ -2,11 +2,12 @@
# Maintainer: Alex Denes <caskd@redxen.eu>
_svcname=opendkim
_grpname=mail
_cfgumask=440
. ../APKBUILD-openrc.common
pkgver=2021.01.27
pkgrel=0
pkgver=2021.02.08
pkgrel=3
sha512sums="afcea7f32fc76faa23c094bc9e83db82e8b652dd8326140d432a91104f65d77b663c362587e72a96853a7b9bc6df1f06fc8b5e887a8b2522162c09b2cd9fc3da runfile
ab5ab3bfcafa6e3c919801162517a05b08352a7fe3686cb01603eb2acabb273ef2501f0c7c1d039200a5f045faaf3bacf70ca377f736700c67b65bacb0b0275a conffile"
sha512sums="2d506bfb74cdc9fe70c96ae4a9db4ee8a4347ce6e268d267cf35892c2d4979afe3fb4e6258c86bdfa29043918e663efea71e94dee932bf763f25250c22738e65 runfile
c6fa8c88593350419ab536423ee3f5e556b9ba54439cc123ad0a3ddb52335349951eb06b5903a0b923d8c24f8b220087abae275b4cbada14e3d6f1af61aa5813 conffile"

View File

@ -1,2 +1 @@
OPENDKIM_CONF="/etc/opendkim/redxen/opendkim.conf"
OPENDKIM_KEY="/etc/opendkim/redxen/mail.private"
OPENDKIM_CONFPATH="/etc/opendkim/redxen"

View File

@ -2,7 +2,7 @@
pidfile="${OPENDKIM_RUNTIME:-/run/opendkim}/${RC_SVCNAME}.pid"
command=/usr/sbin/opendkim
command_args="-l -P ${pidfile} -x ${OPENDKIM_CONF:-/etc/opendkim/opendkim.conf}"
command_args="-l -P ${pidfile} -x ${OPENDKIM_CONF:-${OPENDKIM_CONFPATH}/opendkim.conf}"
command_user="${command_user:-opendkim:opendkim}"
depend() {
@ -12,6 +12,6 @@ depend() {
start_pre() {
checkpath -d -o "$command_user" -m755 "${OPENDKIM_RUNTIME:-/run/opendkim}"
checkpath -f -o "$command_user" -m440 "${OPENDKIM_CONF:-/etc/opendkim/opendkim.conf}"
checkpath -f -o "$command_user" -m440 "${OPENDKIM_KEY:-/etc/opendkim/default.private}"
checkpath -d -o "$command_user" -m550 "${OPENDKIM_CONFPATH:-/etc/opendkim}"
checkpath -f -o "$command_user" -m440 "${OPENDKIM_CONFPATH:-/etc/opendkim}"/*-mail.private
}