dot

packages and services management
Log | Files | Refs | README

commit 3273946d272127b416fe775830aa8b61382b357a
parent 8b415f461ee230dd0105e7f4f5a3f0eb9ee5f8cf
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 27 Dec 2018 22:02:24 +0100

qmail-send: use a authentication

Diffstat:
Mbin/pack-build | 5+++--
Mbin/s6-mk-build | 5++---
Mdot/ssh/authorized_keys | 1+
Aetc/s6/qmail-send/mail.gandi.net/conf/control/authsenders.d/mail.gandi.net | 1+
Aetc/s6/qmail-send/mail.gandi.net/conf/control/tlsdestinations.d/mail.gandi.net | 1+
Detc/s6/qmail-send/tls/conf/tlsdestinations | 1-
Metc/s6/qmail-send/x/setup | 27++++++++++++++++++++++-----
7 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/bin/pack-build b/bin/pack-build @@ -11,7 +11,8 @@ printf ' build' mkdir -p "$PACK/log/$pack/$version" exec >"$PACK/log/$pack/$version/build" 2>&1 -mkdir -p "$PACK/pkg/$pack" +mkdir -p "$PACK/def/$pack/$version" "$PACK/pkg/$pack" +cp -r "/etc/pack/$pack/x/"* "/etc/pack/$pack/$version/"* "$PACK/def" set -- if cd "/etc/pack/$pack/dependencies"; then for dep in *; do @@ -22,6 +23,6 @@ fi cd "$PACK/src/$pack/$version" env DEF="/etc/pack/$pack" PREFIX="$PACK/pkg/$pack/$version" \ - "$@" "/etc/pack/$pack/build" + "$@" "$PACK/def/$pack/build" trap - INT TERM EXIT diff --git a/bin/s6-mk-build b/bin/s6-mk-build @@ -47,6 +47,5 @@ ifthenelse { test ${type} = longrun } { } { } cd ${sv},x -forx -o 0 x { x ${mod} } importas x x -if -t { test -x setup/${x} } -./setup/${x} +if -t { test -f setup } +./setup diff --git a/dot/ssh/authorized_keys b/dot/ssh/authorized_keys @@ -1,2 +1,3 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGdn6aPC0KljXK4T+zmegwbAhHHwd/2n4QOjaTwXhYSN josuah@t470s ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHlcamd0RBxZowSQ1Z1Ppmo4RyBzqYme61TV26K7ccoy u0_a66@localhost +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBL7uS2CcQvPJ3uUxTYXa9fLu9drkriQNb2u10uThwIe root@kuntur diff --git a/etc/s6/qmail-send/mail.gandi.net/conf/control/authsenders.d/mail.gandi.net b/etc/s6/qmail-send/mail.gandi.net/conf/control/authsenders.d/mail.gandi.net @@ -0,0 +1 @@ +mail@josuah.net diff --git a/etc/s6/qmail-send/mail.gandi.net/conf/control/tlsdestinations.d/mail.gandi.net b/etc/s6/qmail-send/mail.gandi.net/conf/control/tlsdestinations.d/mail.gandi.net @@ -0,0 +1 @@ +465 diff --git a/etc/s6/qmail-send/tls/conf/tlsdestinations b/etc/s6/qmail-send/tls/conf/tlsdestinations @@ -1 +0,0 @@ -*: diff --git a/etc/s6/qmail-send/x/setup b/etc/s6/qmail-send/x/setup @@ -1,14 +1,31 @@ #!/usr/bin/env execlineb s6-envdir env +importas GROUP GROUP + +ifthenelse { test -d conf/control/tlsdestinations.d } { + redirfd -w 1 conf/control/tlsdestinations + cd conf/control/tlsdestinations.d + pipeline { elglob -0 x * grep . ${x} /dev/null } + sed "s/:/;/; s/$/:/" +} { echo no tlsdestinations } + +ifthenelse { test -d conf/control/authsenders.d } { + redirfd -w 1 conf/control/authsenders + cd conf/control/authsenders.d + forbacktickx -n -o 0 -d "\n" x { ls } + importas authsender x + + backtick -n x { cat ${authsender} } + importas relay x + + if { printf ":%s|%s|" ${relay} ${authsender} } + pass smtp/${authsender}/${relay} +} { echo no authsenders } -multisubstitute { - importas USER USER - importas GROUP GROUP -} if { s6-hiercopy conf /var/qmail } +if { chgrp -R ${GROUP} /var/qmail } cd /var/qmail -if { chgrp -R ${GROUP} /var/qmail } cd queue if { chmod -R 750 mess todo }