2021-09-09 20:13:39 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
. .drone/common.sh
|
|
|
|
|
|
|
|
# set FQDN in /etc/hosts
|
|
|
|
add_fqdn_to_hosts $(get_ip_addr $(hostname)) mail
|
2021-09-09 23:21:22 -04:00
|
|
|
add_fqdn_to_hosts $(get_ip_addr auth1) auth1
|
2021-09-09 20:13:39 -04:00
|
|
|
|
|
|
|
. venv/bin/activate
|
|
|
|
python tests/MockMailmanServer.py &
|
|
|
|
python tests/MockSMTPServer.py &
|
|
|
|
|
2021-09-09 23:21:22 -04:00
|
|
|
# KERBEROS
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt update
|
|
|
|
apt install -y krb5-user netcat-openbsd
|
|
|
|
cp .drone/krb5.conf /etc/krb5.conf
|
|
|
|
|
|
|
|
# sync with auth1
|
|
|
|
sync_with auth1 9001
|
|
|
|
|
|
|
|
rm -f /etc/krb5.keytab
|
|
|
|
cat <<EOF | kadmin -p sysadmin/admin
|
|
|
|
krb5
|
|
|
|
addprinc -randkey host/mail.csclub.internal
|
|
|
|
ktadd host/mail.csclub.internal
|
|
|
|
addprinc -randkey ceod/mail.csclub.internal
|
|
|
|
ktadd ceod/mail.csclub.internal
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# sync with phosphoric-acid
|
|
|
|
nc -l 0.0.0.0 9000
|
|
|
|
|
2021-09-09 20:13:39 -04:00
|
|
|
sleep infinity
|