dot

packages and services management
Log | Files | Refs | README

commit 52b82aaa0399beb673a535d4aeb671dff003f4c6
parent 868debb2a6dff677ddade2e487b2fc7d6cec8627
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 25 Nov 2018 20:28:05 +0100

writing mail without sh involved

Diffstat:
MREADME | 24+++++++++++++++++-------
Mbin/mail-write | 45+++++++++++++++++++++++++++++++++++++++++++--
Mdot/config/open/protocol/sftp | 5+++--
3 files changed, 63 insertions(+), 11 deletions(-)

diff --git a/README b/README @@ -20,13 +20,23 @@ You might do it using the pack-add tool: Then you can setup the s6-rc directories: # ./conf/s6 -Setup the initial set of services you want: - # service-enable service-1 - # service-enable service-2 - And start the s6 supervision tree: # service-init & -You can then add aditionnal services: - # service-enable service-3 - # service-load +You can then enable and start services: + # service-enable service-1 service-3 + # service-enable service-2 + # service-start service-1 service-2 service-3 + +The fancy things is that you can have service variants: + # service-enable httpd,tls,example.com + # service-start httpd,tls,example.com + +This will copy + /etc/s6/httpd/x/ + /etc/s6/httpd/tls/ + /etc/s6/httpd/example.com/ + +into /var/s6/httpd,tls,example.com,x/ + +And then load this new service into s6-rc. diff --git a/bin/mail-write b/bin/mail-write @@ -1,4 +1,45 @@ #!/usr/bin/env execlineb -elgetpositionals -mcom $@ +backtick -n USER { whoami } importas USER USER +backtick -n HOME { homeof $USER } importas HOME HOME +importas -D ${HOME}/.mblaze MBLAZE MBLAZE + +backtick -n x { mhdr -h sendmail ${MBLAZE}/profile } +importas -D "sendmail" mblaze-sm x + +backtick -n x { mhdr -h sendmail-args ${MBLAZE}/profile } +importas -D "-t" mblaze-sm-args x + +define -ns sendmail "${mblaze-sm} ${mblaze-sm-args}" + +backtick -n x { mhdr -h outbox ${MBLAZE}/profile } +importas -D ${maildir}/OUTBOX outbox x + +backtick -n x { pipeline { dollarat -n -d "," } sed "s/, */, /g" } +importas To x + +backtick -n x { mgenmid } +importas Message-Id x + +elgetopt "b:c:s:f:" +multisubstitute { + importas Cc ELGETOPT_c + importas Bcc ELGETOPT_b + importas Subject ELGETOPT_s + importas From ELGETOPT_f +} + +backtick -n x { mhdr -h local-mailbox ${MBLAZE}/profile } +importas From x + +backtick -n x { mdate } +importas date x + +backtick -n x { + if { printf "%s: %s\n" + To $ + + } +} +importas draft x + diff --git a/dot/config/open/protocol/sftp b/dot/config/open/protocol/sftp @@ -1,2 +1,3 @@ -test -z "$port" && port='22' -exec sftp -P $port $host +#!/usr/bin/sh +test -z "$4" && port='22' || port=$ +exec sftp -P $port $3