dot

packages and services management
Log | Files | Refs | README

commit b1c0807889fc5f74b24186af5c03b868d60cc4bb
parent cd20bab1eb3f22aa9a72570bbe6f49836e0edf94
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 19 Jun 2018 09:39:37 +0200

take configuration files back!

Diffstat:
Mconfigure | 43+++++++++++++++++++------------------------
Ruser/mail/mblaze/profile -> mblaze | 0
Ampoprc | 15+++++++++++++++
Ruser/mail/msmtprc -> msmtprc | 0
Duser/mail/add | 17-----------------
Duser/mail/bin/mfilter | 94-------------------------------------------------------------------------------
Duser/mail/bin/mread | 5-----
Duser/mail/bin/msearch | 5-----
8 files changed, 34 insertions(+), 145 deletions(-)

diff --git a/configure b/configure @@ -1,35 +1,30 @@ #!/bin/sh -ex # install configuration files with symlinks and clone bin -cd $(dirname $0) +cd "$(dirname "$0")" -mkdir -p $HOME/run +mkdir -p "$HOME/run" -mkdir -p $HOME/.config/enchive -ln -fs /mnt/key/enchive.pub $HOME/.config/enchive/enchive.pub -ln -fs /mnt/key/enchive.sec $HOME/.config/enchive/enchive.sec +mkdir -p "$HOME/.config/enchive" +ln -fs "/mnt/key/enchive.pub" "$HOME/.config/enchive/enchive.pub" +ln -fs "/mnt/key/enchive.sec" "$HOME/.config/enchive/enchive.sec" -mkdir -p $HOME/.gnupg -ln -fs /mnt/key/pubring.gpg $HOME/.gnupg/pubring.gpg -ln -fs /mnt/key/secring.gpg $HOME/.gnupg/secring.gpg +mkdir -p "$HOME/.ssh" +cp "$PWD/ssh/authorized_keys" "$HOME/.ssh/authorized_keys" +ln -fs "$PWD/ssh/config" "$HOME/.ssh/config" -mkdir -p $HOME/.ssh -cp $PWD/ssh/authorized_keys $HOME/.ssh/authorized_keys -ln -fs $PWD/ssh/config $HOME/.ssh/config +mkdir -p "$HOME/.config" +mkdir -p "$HOME/.mblaze/" +ln -fs "$PWD/mblaze" "$HOME/.mblaze/profile" +ln -fs "$PWD/profile" "$HOME/.profile" +ln -fs "$PWD/mpoprc" "$HOME/.mpoprc" +ln -fs "$PWD/msmtprc" "$HOME/.msmtprc" +ln -fs "$PWD/xinitrc" "$HOME/.xinitrc" +ln -fs "$PWD/git" "$HOME/.config" -mkdir -p $HOME/.config -mkdir -p $HOME/.mblaze/ -ln -fs $PWD/mblaze $HOME/.mblaze/profile -ln -fs $PWD/profile $HOME/.profile -ln -fs $PWD/mpoprc $HOME/.mpoprc -ln -fs $PWD/msmtprc $HOME/.msmtprc -ln -fs $PWD/xinitrc $HOME/.xinitrc -ln -fs $PWD/git $HOME/.config +! git clone git://josuah.net/bin "$HOME/bin" [ "$(whoami)" = root ] || exit 0 -! git clone git://josuah.net/pack $HOME/pack -! git clone git://josuah.net/svdir $HOME/svdir - -mkdir -p /9 -! git clone git://git.suckless.org/9base /9/base +! git clone git://josuah.net/pack "$HOME/pack" +! git clone git://josuah.net/svdir "$HOME/svdir" diff --git a/user/mail/mblaze/profile b/mblaze diff --git a/mpoprc b/mpoprc @@ -0,0 +1,15 @@ +defaults +tls on +tls_certcheck off +tls_starttls off +uidls_file /home/mail/%U + +account mail@josuah.net +host mail.gandi.net +user mail@josuah.net +auth user +passwordeval "enchive -a$((3600*12)) extract /mnt/key/vault/mpop /dev/stdout" +delivery maildir /home/mail/INBOX +keep on + +account default : mail@josuah.net diff --git a/user/mail/msmtprc b/msmtprc diff --git a/user/mail/add b/user/mail/add @@ -1,17 +0,0 @@ -#!/bin/sh -e -# main maildir storage - -mkdir -p /home/mail/ -useradd -g key -d /home/mail/ mail - -mkdir -p /home/mail/.config/enchive -ln -sf /mnt/key/enchive.sec /mnt/key/enchive.pub /home/mail/.config/enchive/ - -cp -R ../../ssh/ /home/mail/.ssh/ -cp ../../profile /home/mail/.profile -cp -R ./bin/ /home/mail/ -cp -R ./mblaze/ /home/mail/.mblaze/ -cp ./msmtprc /home/mail/.msmtprc - -chown -R mail /home/mail - diff --git a/user/mail/bin/mfilter b/user/mail/bin/mfilter @@ -1,94 +0,0 @@ -#!/bin/sh -e -# read and filter mails using mblaze - -cd /home/mail - -test -z "$MBLAZE" && MBLAZE=/home/mail/.mblaze - -minc INBOX >$MBLAZE/seq.mfilter - -test "$1" = -a && mdirs . | mlist >$MBLAZE/seq.mfilter - -f() { - mkdir -p "$1/cur" "$1/new" "$1/tmp" - printf '%-35s ' "$1" >&2 - mpick -t "$2" <$MBLAZE/seq.mfilter | while IFS='' read -r file - do ! test "$file" = "$1/new" && mv "$file" "$1/new" - done -} - -f actux.eu.org '"To" ~~~ "*@actux.eu.org*"' -f amazon.com '"From" ~~~ "*@amazon.*"' -f amnesty.org '"From" ~~~ "*amnesty.*"' -f bandcamp.com '"From" ~~~ "*Cryo Chamber*"' -f bandcamp.com '"From" ~~~ "*bandcamp.com*"' -f bandcamp.com '"From" ~~~ "*makeupandvanityset.com*"' -f breizh-entropy.org '"List-Id" ~~~ "*breizh-entropy.org*"' -f coinbase.com '"From" ~~~ "*coinbase.com*"' -f crous-paris.fr '"From" ~~~ "*crous-paris.fr*"' -f crous-rennes.fr '"From" ~~~ "*crous-rennes.fr*"' -f dragonflybsd.org--hammer '"List-Id" ~~~ "*hammer.dragonflybsd.org*"' -f dragonflybsd.org--kernel '"List-Id" ~~~ "*kernel.dragonflybsd.org*"' -f dropbox.com '"From" ~~~ "*dropbox.*"' -f ebay.com '"From" ~~~ "*ebay.*"' -f epitech.eu--bde '"From" ~~~ "*bde.epitech.rennes@gmail.com*"' -f epitech.eu--intra '"From" ~~~ "*@intra.epitech.eu*"' -f epitech.eu--marvin '"From" ~~~ "*nao.marvin@epitech.eu*"' -f epitech.eu '"From" ~~~ "*@epitech.eu*"' -f epitech.eu '"From" ~~~ "*ionis-group.org*"' -f etudiant.gouv.fr '"From" ~~~ "*etudiant.gouv.fr*"' -f fosdem.org--announce '"List-Id" ~~~ "*fosdem.lists.fosdem.org*"' -f fosdem.org--distributions '"List-Id" ~~~ "*distributions-devroom.lists.fosdem.org*"' -f fosdem.org--network '"List-Id" ~~~ "*network-devroom.lists.fosdem.org*"' -f fosdem.org--security '"List-Id" ~~~ "*security-devroom.lists.fosdem.org*"' -f fosdem.org '"From" ~~~ "*fosdem.org*"' -f free.fr '"From" ~~~ "*@free-mobile.fr*"' -f freebsd.org '"From" ~~~ "*freebsd.org*"' -f freenode.net '"From" ~~~ "*freenode.net*"' -f fsf.org '"From" ~~~ "*fsf.org*"' -f gandi.net '"From" ~~~ "*gandi.net*"' -f github.com '"From" ~~~ "*github.com*"' -f gobolinux.org '"List-Id" ~~~ "*gobolinux.org*"' -f google.com '"From" ~~~ "*google.com*"' -f gopherproject.org '"List-Id" ~~~ "*gopher-project*"' -f grifon.fr '"List-Id" ~~~ "*grifon.fr*"' -f keybase.io '"From" ~~~ "*keybase.io*"' -f lobste.rs '"From" ~~~ "*@lobste.rs*"' -f meetup.com '"From" ~~~ "*meetup.com*"' -f netsukuku.freaknet.org '"List-Id" ~~~ "*netsukuku.lists.dyne.org*"' -f nixers.net '"From" ~~~ "*@nixers.net*"' -f noip.com '"From" ~~~ "*@noip.com*"' -f openbsd.org--advocacy '"List-ID" ~~~ "*advocacy.openbsd.org*"' -f openbsd.org--announce '"List-ID" ~~~ "*announce.openbsd.org*"' -f openbsd.org--tech '"List-ID" ~~~ "*tech.openbsd.org*"' -f paypal.com '"From" ~~~ "*paypal.*"' -f reddit.com '"From" ~~~ "*@reddit.*"' -f reddit.com '"From" ~~~ "*@redditmail.com*"' -f researchgate.net '"From" ~~~ "*@researchgate.*"' -f researchgate.net '"From" ~~~ "*@researchgatemail.*"' -f sabotage.tech '"Mailing-List" ~~~ "*sabotage*@lists.openwall.com*"' -f skarnet.org '"List-Post" ~~~ "*@list.skarnet.org*"' -f suckless.org '"List-Id" ~~~ "*suckless.org*"' -f tarsnap.com '"From" ~~~ "*tarsnap.com*"' -f transports '"From" ~~~ "*BlaBlaCar*"' -f transports '"From" ~~~ "*flixbus*"' -f transports '"From" ~~~ "*keolis.com*"' -f transports '"From" ~~~ "*megabus*"' -f transports '"From" ~~~ "*oui.sncf*"' -f transports '"From" ~~~ "*ouibus*"' -f transports '"From" ~~~ "*ouigo*"' -f transports '"From" ~~~ "*sncf.com*"' -f transports '"From" ~~~ "*sobus.com*"' -f transports '"From" ~~~ "*trainline.com*"' -f univ-rennes1.fr '"List-Id" ~~~ "*univ-rennes1.fr*"' -f wikimedia.org '"From" ~~~ "*wikimedia.org*"' -f wordpress.com '"From" ~~~ "*wordpress.com*"' -f yammer.com '"From" ~~~ "*yammer.com*"' -f youtube.com '"From" ~~~ "*youtube.com*"' - -mdirs . | sort | while IFS='' read -r dir -do echo "$dir" | sed 's,.*/,#,' - MAILSEQ=$dir/seq - mlist -s "$dir" | mseq -S >/dev/null - mscan -f '%6n %u %D %20f %t%2i%120S' 2>/dev/null -done >index diff --git a/user/mail/bin/mread b/user/mail/bin/mread @@ -1,5 +0,0 @@ -#!/bin/sh -e - -test $# = 1 && INBOX=$1 || INBOX=INBOX -mlist /home/mail/$INBOX | msort -dr | mseq -S -mless diff --git a/user/mail/bin/msearch b/user/mail/bin/msearch @@ -1,5 +0,0 @@ -#!/bin/sh -e - -mdirs /home/mail | mlist | mpick "$@" | msort -rd | mseq -S - -mscan