summaryrefslogtreecommitdiff
path: root/sys/src/cmd/git/git.h
diff options
context:
space:
mode:
authorori@eigenstate.org <ori@eigenstate.org>2022-06-24 00:08:34 +0000
committerOri Bernstein <ori@eigenstate.org>2022-06-24 00:08:34 +0000
commitbb2060028e616df560628cf6f1e6e5d196d50833 (patch)
treec1e7a47adaacca71ffccfaa728cf4caed034bc9a /sys/src/cmd/git/git.h
parent78cc69e9f24f9b3e256c29b73772eedafcb16792 (diff)
upas/dkim: dkim signing for upas
This change adds support for dkim signing to upas. It has2 pieces: 1. Adding support for different asn1 formats to auth/rsa2asn1; we can now generate SubjectPublicKeyInfo RSA keys, which wrap the keys up with an algorithm identifier. 2. Adding a upas/dkim command which filters a message and signs it using dkim. To configure dkim, you need to generate a (small-ish) rsa key; large keys do not fit into DNS text records: # generate the private key and add it to factotum ramfs -p cd /tmp auth/rsagen -b 2048 -t 'service=dkim role=sign hash=sha256 domain=orib.dev owner=*' > dkim.key cat dkim.key > factotum.ctl # extract the public key, encode it, and strip out the junk pubkey=`{ <dkim.key auth/rsa2asn1 -f spki | \ auth/pemencode WHATEVER | \ grep -v 'WHATEVER' | \ ssam 'x/\n/d' } domain=example.org # then add it to /lib/ndb.local echo 'dom=dkim._domainkey.'$domain' soa= ip=144.202.1.203 refresh=600 ttl=600 ns=ns.orib.dev txt="k=rsa; v='$pubkey \ >> /lib/ndb/local Then, finally, insert it into your outgoing mail pipeline. One thing to be careful of is that upas will do some outgoing 'From:' rewriting, so you may need to make sure that either '$upasname' is set, or 'upas/dkim' is inserted after the rewrite stage. A good place is in /mail/lib/qmail, in place of upas/vf: % cat /mail/lib/qmail rfork s upas/dkim -d example.com | upas/qer /mail/queue mail $* || exit 'qer failed' upas/runq -n 10 /mail/queue /mail/lib/remotemail </dev/null >/dev/null >[2=1] &
Diffstat (limited to 'sys/src/cmd/git/git.h')
0 files changed, 0 insertions, 0 deletions