provide tls cert and key to mail server

haraka requires tls certs for:
1. supporting AUTH
2. port 587 support (MSA)

currently, we just reuse the cert for the admin domain. Otherwise,
we have to setup dns etc to get a new cert. While doable, its' not
necessary right now.
This commit is contained in:
Girish Ramakrishnan
2016-05-05 13:18:15 -07:00
parent 7d4ed5bafc
commit 8d79ac9ae0
3 changed files with 19 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ exports = module.exports = {
var appdb = require('./appdb.js'),
assert = require('assert'),
async = require('async'),
certificates = require('./certificates.js'),
clientdb = require('./clientdb.js'),
config = require('./config.js'),
DatabaseError = require('./databaseerror.js'),
@@ -125,7 +126,11 @@ function initialize(callback) {
if (process.env.BOX_ENV === 'test') return callback();
debug('initializing addon infrastructure');
shell.sudo('seutp_infra', [ SETUP_INFRA_CMD, config.fqdn() ], callback);
certificates.getAdminCertificatePath(function (error, certFilePath, keyFilePath) {
if (error) return callback(error);
shell.sudo('seutp_infra', [ SETUP_INFRA_CMD, config.fqdn(), config.adminFqdn(), certFilePath, keyFilePath ], callback);
});
}
function setupAddons(app, addons, callback) {