Fix permission issues on wrong dkim path

Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>
This commit is contained in:
Lukas Matt 2016-04-30 13:15:04 +02:00
parent c8e0f759c0
commit 777b1bacc7
No known key found for this signature in database
GPG key ID: 903A00FC06CC137B

View file

@ -33,10 +33,10 @@ grep -vE '^(\s*$|#)' /tmp/vhost | while read domainname; do
fi
# Write to KeyTable if necessary
keytableentry="mail._domainkey.$domainname $domainname:mail:/tmp/docker-mailserver/opendkim/keys/$domainname/mail.private"
keytableentry="mail._domainkey.$domainname $domainname:mail:/etc/opendkim/keys/$domainname/mail.private"
if [ ! -f "/tmp/docker-mailserver/opendkim/KeyTable" ]; then
echo "Creating DKIM KeyTable"
echo "mail._domainkey.$domainname $domainname:mail:/tmp/docker-mailserver/opendkim/keys/$domainname/mail.private" > /tmp/docker-mailserver/opendkim/KeyTable
echo $keytableentry > /tmp/docker-mailserver/opendkim/KeyTable
else
if ! grep -q "$keytableentry" "/tmp/docker-mailserver/opendkim/KeyTable" ; then
echo $keytableentry >> /tmp/docker-mailserver/opendkim/KeyTable