diff --git a/src/mail.js b/src/mail.js index 92bb9026c..3b301319c 100644 --- a/src/mail.js +++ b/src/mail.js @@ -768,7 +768,7 @@ function txtRecordsWithSpf(domain, mailFqdn, callback) { assert.strictEqual(typeof callback, 'function'); domains.getDnsRecords('', domain, 'TXT', function (error, txtRecords) { - if (error) return error; + if (error) return callback(error); debug('txtRecordsWithSpf: current txt records - %j', txtRecords); @@ -939,7 +939,10 @@ function changeLocation(auditSource, progressCallback, callback) { progressCallback({ percent: progress, message: `Updating DNS of ${domainObject.domain}` }); progress += Math.round(70/allDomains.length); - upsertDnsRecords(domainObject.domain, fqdn, iteratorDone); + upsertDnsRecords(domainObject.domain, fqdn, function (error) { // ignore any errors. we anyway report dns errors in status tab + progressCallback({ percent: progress, message: `Updated DNS of ${domainObject.domain}: ${error ? error.message : 'success'}` }); + iteratorDone(); + }); }, function (error) { if (error) return callback(error);