summaryrefslogtreecommitdiff
path: root/notmuch-tcp
blob: 57da3f5ee4d33da66f8605e56ec7f5e867910740 (plain)
1
2
3
4
5
6
7
8
9
#!@zsh@/bin/zsh

NOTMUCH_TCP=${NOTMUCH_TCP:-2010}
HOST=${HOST:-$(@nettools@/bin/hostname -s)}
NOTMUCH_HOST=${NOTMUCH_HOST:-odin.asgard.yggdrasil}

cd ~/.notmuch-tcp

@socat@/bin/socat STDIO,ignoreeof openssl:${NOTMUCH_HOST}:${NOTMUCH_TCP},verify=1,cafile=ca.pem,certificate=${HOST}.pem,key=${HOST}.key <<(print "${(@q)@}"; inp=$(cat); printf "%d\n" $(@coreutils@/bin/wc -c <<<"${inp}"); @coreutils@/bin/cat <<<"${inp}")