diff --git a/lib/sender.js b/lib/sender.js index ab196f3..56dea97 100644 --- a/lib/sender.js +++ b/lib/sender.js @@ -100,7 +100,7 @@ class Sender extends EventEmitter { get: async domain => { if (!db.redis) { - return; + return { enabled: false, error: 'Redis connection error' }; // if no redis return that MTA-STS is disabled } try { let json = await db.redis.get(`sts:${domain}`); @@ -123,6 +123,7 @@ class Sender extends EventEmitter { } } catch (err) { log.error(this.logName + '/MTA-STS', 'Redis error domain=%s err=%s', domain, err.message); + return { enabled: false, error: 'Redis request and connection error' }; // If redis error return MTA-STS is disabled } } },