Merge pull request #1218 from romansey/fix-opendkim-multiple-nameservers

Fixed opendkim config on multiple nameservers
This commit is contained in:
Erik Wramner 2019-08-09 10:58:16 +02:00 committed by GitHub
commit 1903e98ef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -853,7 +853,7 @@ function _setup_dkim() {
# Setup nameservers paramater from /etc/resolv.conf if not defined
if ! grep '^Nameservers' /etc/opendkim.conf; then
echo "Nameservers $(grep '^nameserver' /etc/resolv.conf | awk -F " " '{print $2}')" >> /etc/opendkim.conf
echo "Nameservers $(grep '^nameserver' /etc/resolv.conf | awk -F " " '{print $2}' | paste -sd ',' -)" >> /etc/opendkim.conf
notify 'inf' "Nameservers added to /etc/opendkim.conf"
fi
}