Python CSC Electronic Office
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pyceo/.drone/mail-setup.sh

36 lines
714 B

#!/bin/bash
set -ex
. .drone/common.sh
# set FQDN in /etc/hosts
add_fqdn_to_hosts $(get_ip_addr $(hostname)) mail
add_fqdn_to_hosts $(get_ip_addr auth1) auth1
. venv/bin/activate
python tests/MockMailmanServer.py &
python tests/MockSMTPServer.py &
# 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
sleep infinity