mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 21:34:38 +03:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user