dot

packages and services management
Log | Files | Refs | README

commit a7c6ccdac7f55e23042b8e47ae1aac46e9edbeeb
parent b1d4c021663fa3d631d45b2a7b041d015b1244bc
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri,  4 Jan 2019 04:18:11 +0100

can now send mail

Diffstat:
Mbin/mail-filter | 32+++++++++++++++++++-------------
Dbin/mail-print | 4----
Adot/profile | 1+
Metc/pack/sqmail/default/build | 4++--
Metc/s6-mk/host/kuntur/contents | 2+-
Metc/s6-mk/qmail-send/default/setup | 29+++++++++++------------------
Retc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-mail -> etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-abuse | 0
Retc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-services -> etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-default | 0
Retc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-mail -> etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-mailer-daemon | 0
Aetc/s6-mk/qmail-send/josuah.net/conf/control/authsenders | 1+
Detc/s6-mk/qmail-send/josuah.net/conf/control/authsenders.d/mail.gandi.net | 1-
Aetc/s6-mk/qmail-send/josuah.net/conf/control/tlsdestinations | 2++
Detc/s6-mk/qmail-send/josuah.net/conf/control/tlsdestinations.d/mail.gandi.net | 1-
13 files changed, 37 insertions(+), 40 deletions(-)

diff --git a/bin/mail-filter b/bin/mail-filter @@ -1,6 +1,11 @@ #!/usr/bin/env execlineb -backtick -n x { whoami } importas USER x -backtick -n x { homeof $USER } importas HOME x + +backtick -n x { whoami } +importas USER x + +backtick -n x { homeof $USER } +importas HOME x + multisubstitute { importas -D ${HOME}/.mblaze MBLAZE MBLAZE importas -D INBOX INBOX 1 @@ -11,18 +16,19 @@ cd $MAILDIR fdmove -c 1 2 -forbacktickx -n x { ls ${MBLAZE}/sort } importas target x +if { pipeline { glob -0 x * minc ${x} } mseq -S } + +forbacktickx -n x { ls ${MBLAZE}/sort } +importas target x + +if { printf " %-35s " ${target} } if { mkdir -p -m 0700 ${target}/cur ${target}/new ${target}/tmp } -if { fdmove -c 1 2 printf "%-35s " $target } -backtick -n x { - pipeline { cat ${MBLAZE}/sort/${target} } - tr "\n" " " -} importas rule x +backtick -n x { redirfd -r 0 ${MBLAZE}/sort/${target} tr "\n" " " } +importas rule x -forbacktickx -n x { - pipeline { mlist $INBOX } - mpick -v -t $rule -} importas file x +forbacktickx -n x { mpick -v -t ${rule} } +importas file x -if { test ${file} != ${target}/new } mv $file ${target}/new +if { test ${file} != ${target}/new } +mv $file ${target}/new diff --git a/bin/mail-print b/bin/mail-print @@ -1,4 +0,0 @@ -#!/usr/bin/env execlineb -elgetpositionals - -mshow $@ diff --git a/dot/profile b/dot/profile @@ -0,0 +1 @@ +export QMAILUSER=mail diff --git a/etc/pack/sqmail/default/build b/etc/pack/sqmail/default/build @@ -12,8 +12,8 @@ echo "$PREFIX/man" >conf-man cp "$ucspi_ssl/lib/ucspissl.a" compile rm -rf /var/qmail/bin -for f in ids dir ucspissl compile legacy; do - sed 's/env - /env/' package/$f | sh +for x in ids dir ucspissl compile legacy; do + sed 's/env - /env/' package/$x | sh done mv /var/qmail/bin "$PREFIX/bin" diff --git a/etc/s6-mk/host/kuntur/contents b/etc/s6-mk/host/kuntur/contents @@ -5,6 +5,6 @@ httpfile,tcp,x httpfile,tls,h-o.st,x qmail-smtpd,tcp,josuah.net,x qmail-smtpd,tls,josuah.net,x -qmail-send,josuah.net,mail.gandi.net,x +qmail-send,josuah.net,x tinysshd,x transmission,x diff --git a/etc/s6-mk/qmail-send/default/setup b/etc/s6-mk/qmail-send/default/setup @@ -1,31 +1,22 @@ #!/usr/bin/env execlineb -s6-envdir env -importas GROUP GROUP - -if { - elglob -0 x conf/control/*.d/ forx x { ${x} } - importas conf.d x - - backtick -n x { heredoc ${conf.d} sed "s/...$//" } - importas conf x - - redirfd -w 1 ${conf} - elglob -0 conf.d/file * cat ${conf.d/file} -} ifthenelse { test -f conf/control/authsenders } { + ifte { mv conf/control/authsenders.tmp conf/control/authsenders } { exit 1 } redirfd -r 0 conf/control/authsenders redirfd -w 1 conf/control/authsenders.tmp forstdin -n x - importas + importas line x - pass smtp/${relay}/${authsender} -} { } + if { printf "%s" ${line} } -if { s6-hiercopy conf /var/qmail } -if { chgrp -RL ${GROUP} /var/qmail } + backtick -n x { heredoc 0 ${line} sed -r "s,^[^:]*:,,; s,(;[0-9]+)?[|],/,; s,[|]$,,; " } + importas relay/sender x + pass smtp/${relay/sender} +} { } + +if { s6-hiercopy conf /var/qmail } cd /var/qmail @@ -43,6 +34,8 @@ if { find alias -type f -exec chmod 640 {} + } if { chown -RL root control } if { find control -type d -exec chmod 750 {} + } if { find control -type f -exec chmod 640 {} + } +if { chmod 755 control } +if { chmod 644 control/me } if { chown qmailq queue } if { chmod 750 queue } diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-mail b/etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-abuse diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-services b/etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-default diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-mail b/etc/s6-mk/qmail-send/josuah.net/conf/alias/.qmail-mailer-daemon diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/control/authsenders b/etc/s6-mk/qmail-send/josuah.net/conf/control/authsenders @@ -0,0 +1 @@ +:mail.gandi.net|mail@josuah.net| diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/control/authsenders.d/mail.gandi.net b/etc/s6-mk/qmail-send/josuah.net/conf/control/authsenders.d/mail.gandi.net @@ -1 +0,0 @@ -mail@josuah.net diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/control/tlsdestinations b/etc/s6-mk/qmail-send/josuah.net/conf/control/tlsdestinations @@ -0,0 +1,2 @@ +%smtp-relay.gmail.com:=8CDB62841CDD7B670E58C01BA6D801B484DA2836||;465 +%mail.gandi.net:=D083133D99990F800AB558C451271381458E74F0||;465 diff --git a/etc/s6-mk/qmail-send/josuah.net/conf/control/tlsdestinations.d/mail.gandi.net b/etc/s6-mk/qmail-send/josuah.net/conf/control/tlsdestinations.d/mail.gandi.net @@ -1 +0,0 @@ -;465