#!/bin/bash # OpenDKIM # -------- # # OpenDKIM provides a service that puts a DKIM signature on outbound mail. # # The DNS configuration for DKIM is done in the management daemon. source setup/functions.sh # load our functions source /etc/mailinabox.conf # load global vars # Install DKIM... echo "Installing OpenDKIM/OpenDMARC..." apt_install opendkim opendkim-tools opendmarc # Make sure configuration directories exist. mkdir -p /etc/opendkim mkdir -p "$STORAGE_ROOT/mail/dkim" # Used in InternalHosts and ExternalIgnoreList configuration directives. # Not quite sure why. echo "127.0.0.1" >/etc/opendkim/TrustedHosts # We need to at least create these files, since we reference them later. # Otherwise, opendkim startup will fail touch /etc/opendkim/KeyTable touch /etc/opendkim/SigningTable if grep -q "ExternalIgnoreList" /etc/opendkim.conf; then true # already done #NODOC else # Add various configuration options to the end of `opendkim.conf`. cat >>/etc/opendkim.conf <