1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Add syntax for very long DKIM strings (#295)

* Add DKIM() function to split long strings.
* Add parse_test for DKIM()
This commit is contained in:
Tom Limoncelli
2018-01-04 21:17:08 -05:00
committed by GitHub
parent be50e1a6a3
commit a03c8f19e8
4 changed files with 115 additions and 80 deletions

View File

@ -601,3 +601,12 @@ function SPF_BUILDER(value) {
return r;
}
// Split a DKIM string if it is >254 bytes.
function DKIM(arr) {
chunkSize = 255;
var R = [];
for (var i = 0, len = arr.length; i < len; i += chunkSize)
R.push(arr.slice(i, i + chunkSize));
return R;
}