Allow setup to be run again as long as not-activated
this is useful if the activation fails somewhere mid-way and we don't need to re-setup the cloudron all over
This commit is contained in:
11
src/mail.js
11
src/mail.js
@@ -8,6 +8,7 @@ exports = module.exports = {
|
||||
getDomain: getDomain,
|
||||
addDomain: addDomain,
|
||||
removeDomain: removeDomain,
|
||||
clearDomains: clearDomains,
|
||||
|
||||
setDnsRecords: setDnsRecords,
|
||||
|
||||
@@ -807,6 +808,16 @@ function removeDomain(domain, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function clearDomains(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
maildb.clear(function (error) {
|
||||
if (error) return callback(new MailError(MailError.INTERNAL_ERROR, error));
|
||||
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
function setMailFromValidation(domain, enabled, callback) {
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
assert.strictEqual(typeof enabled, 'boolean');
|
||||
|
||||
Reference in New Issue
Block a user