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.

21 lines
543 B

# Generate config
if [ ! -f /haraka/config/smtp.ini ]; then
haraka -i /haraka
# Specify hostname
echo $HOSTNAME > /haraka/config/me
# Get and install certificates from Let's Encrypt
if [ ! -f /haraka/config/tls ]; then
certbot certonly -n --agree-tos -d "$HOSTNAME" --standalone --preferred-challenges http
mkdir -p /haraka/config/tls
cd /haraka/config/tls
ln -s /etc/letsencrypt/live/$HOSTNAME/privkey.pem tls-key.pem
ln -s /etc/letsencrypt/live/$HOSTNAME/fullchain.pem tls-cert.pem
cd -
haraka -c /haraka