From 9210deb9717259124040daae556b180ef31d2f5b Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 16 Jan 2014 10:18:51 +0000 Subject: [PATCH] Test if DKIM generated file exist --- src/functions_dns.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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