implement only monitoring dns blocklists, without using them for incoming deliveries

so you can still know when someone has put you on their blocklist (which may
affect delivery), without using them.

also query dnsbls for our ips more often when we do more outgoing connections
for delivery: once every 100 messages, but at least 5 mins and at most 3 hours
since the previous check.
This commit is contained in:
Mechiel Lukkien
2024-03-05 16:30:38 +01:00
parent e0c36edb8f
commit 15e450df61
13 changed files with 305 additions and 83 deletions

View File

@ -1181,12 +1181,20 @@ export class Client {
//
// The returned value maps IPs to per DNSBL statuses, where "pass" means not listed and
// anything else is an error string, e.g. "fail: ..." or "temperror: ...".
async DNSBLStatus(): Promise<{ [key: string]: { [key: string]: string } }> {
async DNSBLStatus(): Promise<[{ [key: string]: { [key: string]: string } }, Domain[] | null, Domain[] | null]> {
const fn: string = "DNSBLStatus"
const paramTypes: string[][] = []
const returnTypes: string[][] = [["{}","{}","string"]]
const returnTypes: string[][] = [["{}","{}","string"],["[]","Domain"],["[]","Domain"]]
const params: any[] = []
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as { [key: string]: { [key: string]: string } }
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as [{ [key: string]: { [key: string]: string } }, Domain[] | null, Domain[] | null]
}
async MonitorDNSBLsSave(text: string): Promise<void> {
const fn: string = "MonitorDNSBLsSave"
const paramTypes: string[][] = [["string"]]
const returnTypes: string[][] = []
const params: any[] = [text]
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as void
}
// DomainRecords returns lines describing DNS records that should exist for the