mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
6eb228d0b8
This code change adds the INCOMING_EMAIL_DOMAIN variable to the host_list configuration in the Haraka init.sh script. This ensures that incoming emails from the specified domain are accepted by the Haraka application. The INCOMING_EMAIL_DOMAIN value is appended to the host_list file, allowing the application to properly handle emails from this domain.
29 lines
1.0 KiB
Bash
29 lines
1.0 KiB
Bash
|
|
|
|
# Setup auth
|
|
echo "domain = $DOMAIN" >> /harakaapp/config/dkim_sign.ini
|
|
echo "$DOMAIN" > /harakaapp/config/host_list
|
|
echo "$INCOMING_EMAIL_DOMAIN" >> /harakaapp/config/host_list
|
|
echo "$DOMAIN" > /harakaapp/config/me
|
|
echo "$SMTP_EMAIL=$SMTP_PASSWORD" >> /harakaapp/config/auth_flat_file.ini
|
|
|
|
openssl req -x509 -nodes -days 2190 -newkey rsa:2048 -keyout /harakaapp/config/tls_key.pem -out /harakaapp/config/tls_cert.pem -subj "/C=US/ST=Massachusetts/L=Boston/O=Hackerbay/CN=$DOMAIN"
|
|
|
|
# DKIM
|
|
mkdir -p /harakaapp/config/dkim/$DOMAIN
|
|
touch /harakaapp/config/dkim/$DOMAIN/selector
|
|
echo "$DKIM_SELECTOR" > /harakaapp/config/dkim/$DOMAIN/selector
|
|
|
|
# Decode keys from base64
|
|
echo "$DKIM_PUBLIC_KEY" | base64 -d > /harakaapp/config/dkim/$DOMAIN/public
|
|
echo "$DKIM_PRIVATE_KEY" | base64 -d > /harakaapp/config/dkim/$DOMAIN/private
|
|
|
|
echo "IMPORTANT: Add this to your DNS"
|
|
echo "You need to add this to DNS"
|
|
echo "Type: TXT"
|
|
echo "Key: $DKIM_SELECTOR._domainkey"
|
|
echo "v=DKIM1;p=$(grep -v '^-' /harakaapp/config/dkim/$DOMAIN/public | tr -d '\n')"
|
|
|
|
|
|
# Run haraka
|
|
haraka -c /harakaapp |