diff --git a/src/functions_dns.sh b/src/functions_dns.sh index 86bfa316..84f31595 100755 --- a/src/functions_dns.sh +++ b/src/functions_dns.sh @@ -164,7 +164,10 @@ dns_regenerate() { grep -q "^$domain alternc._domainkey.$domain\$" /etc/opendkim/SigningTable || echo "$domain alternc._domainkey.$domain" >> /etc/opendkim/SigningTable fi # we add alternc._domainkey with the proper key - file="$(echo -e "$file" ; cat "/etc/opendkim/keys/$domain/alternc.txt")" + + if [ -r "/etc/opendkim/keys/$domain/alternc.txt" ] ; then + file="$(echo -e "$file" ; cat "/etc/opendkim/keys/$domain/alternc.txt")" + fi fi ##### OpenDKIM signature management - END