check spf and dkim all the time

This commit is contained in:
Girish Ramakrishnan
2017-02-02 14:00:13 -08:00
parent ff491be976
commit 34fedb5835

View File

@@ -70,23 +70,16 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
};
function runConfigurationChecks() {
// Check if all email DNS records are set up properly
Client.getMailConfig(function (error, mailConfig) {
Client.getExpectedDnsRecords(function (error, result) {
if (error) return console.error(error);
if (!mailConfig.enabled) return;
Client.getExpectedDnsRecords(function (error, result) {
if (error) return console.error(error);
if (!result.spf.status || !result.dkim.status) {
var actionScope = $scope.$new(true);
actionScope.action = '/#/settings';
if (!result.spf.status || !result.dkim.status) {
var actionScope = $scope.$new(true);
actionScope.action = '/#/settings';
Client.notify('DNS Configuration', 'Please setup all required DNS records to guarantee correct mail delivery', true, 'info', actionScope);
}
});
Client.notify('DNS Configuration', 'Please setup all required DNS records to guarantee correct mail delivery', true, 'info', actionScope);
}
});
}