Make the dkim private keys readable

https://forum.cloudron.io/topic/1675/dkim-and-dmarc-for-built-in-outgoing-mail/25
This commit is contained in:
Girish Ramakrishnan
2019-06-06 14:37:57 -07:00
parent 1b6af9bd12
commit b26167481e
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -797,6 +797,9 @@ function ensureDkimKeySync(domain) {
if (!safe.fs.writeFileSync(dkimSelectorFile, constants.DKIM_SELECTOR, 'utf8')) return new MailError(MailError.INTERNAL_ERROR, safe.error);
// if the 'yellowtent' user of OS and the 'cloudron' user of mail container don't match, the keys become inaccessible by mail code
if (!safe.fs.chmodSync(dkimPrivateKeyFile, 0o644)) return new MailError(MailError.INTERNAL_ERROR, safe.error);
return null;
}