56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
import { TagListRecord } from "./TagListRecord.js";
|
|
import { ConstantTag } from "../tags/ConstantTag.js";
|
|
import { EnumTag } from "../tags/EnumTag.js";
|
|
import { TextTag } from "../tags/TextTag.js";
|
|
import { FlagsTag } from "../tags/FlagsTag.js";
|
|
|
|
export class DkimRecord extends TagListRecord {
|
|
static fields = [
|
|
new ConstantTag("v", "DKIM1")
|
|
.required()
|
|
.hidden()
|
|
.pos(0),
|
|
|
|
new TextTag("p")
|
|
.label("Public key")
|
|
.desc("Base64-encoded public key data")
|
|
.required()
|
|
.pos(1),
|
|
|
|
new FlagsTag("t", ["y", "s"])
|
|
.label("Flags")
|
|
.desc("Optional extra options that can be enabled")
|
|
.options(["Test mode", "Require identical domain in i= and d= tags of DKIM signature (Recommended)"])
|
|
.default("")
|
|
.pos(1),
|
|
|
|
new EnumTag("h", ["sha1", "sha256"])
|
|
.label("Hash algorithms")
|
|
.desc("Which hash algorithms are allowed to be used. If not set, all are allowed")
|
|
.options(["SHA-1", "SHA-256"])
|
|
.category("advanced")
|
|
.pos(1),
|
|
|
|
new TextTag("n")
|
|
.label("Note")
|
|
.desc("Any extra comments for humans. Not parsed by machines")
|
|
.category("advanced")
|
|
.default("")
|
|
.pos(1),
|
|
|
|
new EnumTag("k", ["rsa"])
|
|
.disabled()
|
|
.default("rsa")
|
|
.pos(1),
|
|
|
|
new EnumTag("s", ["*", "email"])
|
|
.disabled()
|
|
.default("*")
|
|
.pos(1),
|
|
];
|
|
|
|
static categories = {
|
|
"advanced": "Advanced",
|
|
};
|
|
}
|