diff --git a/src/mail.js b/src/mail.js index 38ab4cc2e..1bb790c16 100644 --- a/src/mail.js +++ b/src/mail.js @@ -650,7 +650,7 @@ async function createMailConfig(mailFqdn, mailDomain) { if (!safe.fs.writeFileSync(`${paths.MAIL_CONFIG_DIR}/dkim/${domain.domain}/selector`, domain.dkimSelector)) throw new BoxError(BoxError.FS_ERROR, `Could not create selector file: ${safe.error.message}`); // 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(`${paths.MAIL_CONFIG_DIR}/mail/${domain.domain}/private`, 0o644)) return new BoxError(BoxError.FS_ERROR, safe.error); + if (!safe.fs.chmodSync(`${paths.MAIL_CONFIG_DIR}/dkim/${domain.domain}/private`, 0o644)) throw new BoxError(BoxError.FS_ERROR, safe.error); const relay = domain.relay;