Start milestone 3

- Add functionality to query online sources (Keyservers, etc) for
  certificates.
- Use introducers to determine which UserIDs should be fetched from
  online soources. Check certifications before importing certifiactes
  into the local cert store.
- start docker image for local end-to-end testing.
This commit is contained in:
Malte Meiboom
2026-01-23 12:57:26 +01:00
parent 4270bf4ceb
commit 30b1d29274
23 changed files with 685 additions and 10 deletions
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/bash
BRANCH=$1
## create domain
echo "127.0.0.1 " $(hostname) > /etc/hosts
echo "127.0.0.2 example.com" >> /etc/hosts
## build milter
if [ -f /opt/husk/mapped/husk ] ; then
HUSK_BIN=/opt/husk/mapped/husk
else
cd /opt/husk
git clone https://gitlab.com/husk-project/husk-milter.git
cd husk-milter
if [ "$BRANCH" != "" ] ; then
git checkout $BRANCH
fi
cargo build --release
HUSK_BIN=/opt/husk/husk-milter/target/release/husk
fi
## start rsyslogd
/usr/sbin/rsyslogd -n -iNONE &
## start postfix
sudo postfix start
## start and prepare postgres
DOMAINS="example.com"
sudo /etc/init.d/postgresql start
echo "create user hockeypuck;" | sudo -u postgres psql -d template1 -U postgres
for domain in $DOMAINS ; do
DB_NAME=$(echo $domain | tr -d '.-')
echo "
create database hkp_$DB_NAME with owner 'hockeypuck';
GRANT ALL PRIVILEGES ON DATABASE hkp_$DB_NAME to hockeypuck;
" | sudo -u postgres psql -d template1 -U postgres
done
#
# start hockeypuck
#
echo "start hockeypuck"
for domain in $DOMAINS ; do
echo " $domain..."
sudo -u hockeypuck hockeypuck --config /etc/hockeypuck.d/hockeypuck_$domain.conf 2>&1 > /tmp/hockeypuck_$domain.out &
done
## create sequoia_home
bash /usr/bin/gen_sq_home.sh
## start milter
cd /opt/husk
$HUSK_BIN config.toml &