Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/dns/import.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { KNOWN_DKIM_PROVIDERS } from "../email/dkim-providers";
import type { RecordType, Zone, ZoneRecord } from "../zone/types";
import { query } from "./query";
import { DEFAULT_RESOLVERS } from "./resolvers";
import type { DohAnswer } from "./types";

const APEX_TYPES: RecordType[] = ["SOA", "NS", "A", "AAAA", "MX", "TXT", "CAA"];

const SUBDOMAIN_PROBES: Array<{ name: string; types: RecordType[] }> = [
{ name: "www", types: ["A", "AAAA", "CNAME"] },
{ name: "_dmarc", types: ["TXT"] },
{ name: "mail", types: ["A", "AAAA", "CNAME"] },
{ name: "autodiscover", types: ["CNAME"] },
...Object.keys(KNOWN_DKIM_PROVIDERS).map((sel) => ({
name: `${sel}._domainkey`,
types: ["TXT", "CNAME"] as RecordType[],
})),
];

export interface DnsImportResult {
Expand Down
18 changes: 1 addition & 17 deletions src/email/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,7 @@ export interface EmailCheck {
records: ZoneRecord[];
}

const KNOWN_DKIM_PROVIDERS: Record<string, string> = {
google: "Google Workspace",
selector1: "Microsoft 365",
selector2: "Microsoft 365",
mailgun: "Mailgun",
k1: "Mailchimp",
k2: "Mailchimp",
k3: "Mailchimp",
pm: "Postmark",
sendgrid: "SendGrid",
s1: "SendGrid",
s2: "SendGrid",
zoho: "Zoho",
amazonses: "Amazon SES",
ahasend: "AhaSend",
ahasend2: "AhaSend",
};
import { KNOWN_DKIM_PROVIDERS } from "./dkim-providers";

function stripTrailingDot(s: string): string {
return s.replace(/\.$/, "");
Expand Down
19 changes: 19 additions & 0 deletions src/email/dkim-providers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/** Known DKIM selectors mapped to their provider display name. */
export const KNOWN_DKIM_PROVIDERS: Record<string, string> = {
google: "Google Workspace",
selector1: "Microsoft 365",
selector2: "Microsoft 365",
mailgun: "Mailgun",
k1: "Mailchimp",
k2: "Mailchimp",
k3: "Mailchimp",
pm: "Postmark",
sendgrid: "SendGrid",
s1: "SendGrid",
s2: "SendGrid",
zoho: "Zoho",
amazonses: "Amazon SES",
ahasend: "AhaSend",
ahasend2: "AhaSend",
protonmail: "Proton Mail",
};
Loading