Skip to content

Commit

Permalink
Merge pull request #3 from OnKey/master
Browse files Browse the repository at this point in the history
added support for aspf and adkim
  • Loading branch information
c0bra committed Apr 5, 2020
2 parents 4e91952 + 1f847ef commit 5d589cf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ const validators = {
throw new Error(`Invalid value for '${term}': '${value}', must be one of: none, quarantine, reject`);
}
}
},
aspf: {
description: 'SPF Alignment mode. Can be "s" or "r".',
validate(term, value) {
if (!/^(s|r)$/i.test(value)) {
throw new Error(`Invalid value for '${term}': '${value}', must be one of: s, r`);
}
}
},
adkim: {
description: 'DKIM Alignment mode. Can be "s" or "r".',
validate(term, value) {
if (!/^(s|r)$/i.test(value)) {
throw new Error(`Invalid value for '${term}': '${value}', must be one of: s, r`);
}
}
}
};

Expand Down

0 comments on commit 5d589cf

Please sign in to comment.