split mail and mailserver

mail = all the per-domain code
mailserver = all the mail server level code
This commit is contained in:
Girish Ramakrishnan
2023-08-04 20:54:16 +05:30
parent fb9d8c23e1
commit 946e5caacb
8 changed files with 349 additions and 327 deletions

View File

@@ -48,7 +48,7 @@ const acme2 = require('./acme2.js'),
ejs = require('ejs'),
eventlog = require('./eventlog.js'),
fs = require('fs'),
mail = require('./mail.js'),
mailServer = require('./mailserver.js'),
network = require('./network.js'),
os = require('os'),
path = require('path'),
@@ -173,7 +173,7 @@ function validateCertificate(subdomain, domain, certificate) {
}
async function notifyCertChange() {
await mail.checkCertificate();
await mailServer.checkCertificate();
await shell.promises.sudo('notifyCertChange', [ RESTART_SERVICE_CMD, 'box' ], {}); // directory server
const allApps = (await apps.list()).filter(app => app.runState !== apps.RSTATE_STOPPED);
for (const app of allApps) {