From d38f9738fe6a244a900729fb102018c9a6f88c1e Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 30 Oct 2015 21:36:40 -0700 Subject: [PATCH] fix spf record --- cloudron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudron.js b/cloudron.js index 3bc0e1b..bcc9dd1 100644 --- a/cloudron.js +++ b/cloudron.js @@ -276,7 +276,7 @@ Cloudron.prototype.checkSPF = function (callback) { if (error) return callback(error); if (records.length !== 1 || records[0].length !== 1) return callback(new Error('Got ' + JSON.stringify(records) + ' TXT records. Expecting 1 length 2d array')); - if (records[0][0].search(new RegExp('^v=spf1 ip4:' + that._box.ip + ' ~all$')) !== 0) return callback(new Error('Bad SPF record. ' + records[0][0])); + if (records[0][0].search(new RegExp('^v=spf1 a:' + that._box.domain + ' ~all$')) !== 0) return callback(new Error('Bad SPF record. ' + records[0][0])); callback(null, records); });