add automatic greylisting

This commit is contained in:
Aine
2022-11-16 18:47:24 +02:00
parent 15b90e9e4c
commit 8ebe80bc4f
10 changed files with 207 additions and 78 deletions

View File

@@ -18,6 +18,7 @@ const (
botOptionQueueBatch = "queue:batch"
botOptionQueueRetries = "queue:retries"
botOptionBanlistEnabled = "banlist:enabled"
botOptionGreylist = "greylist"
)
type botSettings map[string]string
@@ -56,6 +57,11 @@ func (s botSettings) BanlistEnabled() bool {
return utils.Bool(s.Get(botOptionBanlistEnabled))
}
// Greylist option (duration in minutes)
func (s botSettings) Greylist() int {
return utils.Int(s.Get(botOptionGreylist))
}
// DKIMSignature (DNS TXT record)
func (s botSettings) DKIMSignature() string {
return s.Get(botOptionDKIMSignature)